John Macdonald was commissioned into the 89th Regiment of Foot on 15 April 1795. He became lieutenant the regiment 2 February 1796, and captain 22 October 1803. He was made a major-unattached 28 February 1805, lieutenant-colonel on half-pay of the 1st garrison battalion 17 March 1808, brevet colonel 4 June 1814, major-general 1825, and lieutenant-general 1838. He served with the 89th in the Irish Rebellion of 1798, and afterwards in Minorca, Heasina, and at the blockade of Malta and capture of Valletta in 1799–1800, and throughout the campaign in Egypt in 1801.