Educated at Edinburgh Academy and at Sandhurst, Mackenzie was commissioned into the Bedfordshire Regiment of the British Army, at the time the 16th Regiment of Foot in January, 1881, but soon transferred into the Seaforth Highlanders. He took part in the Nile expedition of 1882, the Burma expedition of 1886 and the Hazara expedition in 1888, and was promoted to captain on 25 October 1889. Following promotion to major on 27 April 1892, he served as Deputy Assistant Adjutant General for the Quetta District of India from 1892 to 1896. He also took part in the Waziristan expedition of 1894 and the Nile expedition of 1898.