Ogston was the son of Alexander Milne Ogston of Ardoe, Kincardineshire. He was educated at the Royal Military College, Sandhurst and commissioned a second lieutenant in the Gordon Highlanders in November 1897. He served on the North-West Frontier of India from 1897 to 1898 and took part in the Tirah Campaign under Sir William Lockhart. Promoted to lieutenant on 21 July 1899, he was later the same year sent to South Africa to serve as an intelligence officer in the Second Boer War. He took part in the Relief of Kimberley (February 1900), including the Battle of Magersfontein (11 December 1899), followed by fighting in the Orange Free State from February to May 1900, including the Battle of Paardeberg (18–27 February 1900). In May 1900 he was posted to the Transvaal Republic, where he took part in the occupation of Johannesburg and Pretoria, the capital of the republic, followed by service around the occupied areas, including the Battle of Bergendal (August 1900) and fighting near Lydenburg. He was promoted to captain on 22 January 1902, and following the end of hostilities in early June 1902 left Cape Town on board the "SS Orotava", arriving at Southampton the next month.