[1] He was initially educated at home by a private tutor, before attending the grammar school at Elgin, and Marischal College in Aberdeen, and after deciding to join the army was sent to a military academy at Lille.
There he served as aide-de-camp to the governor Sir Robert Boyd,[4] and later as ADC to General Charles O'Hara, whom he accompanied to Toulon during the British occupation of 1793.
After O'Hara was taken prisoner, Leith served on the staff of Major-General Sir David Dundas, until the city was evacuated in December, when he returned to Gibraltar.
[2] In 1808, he was promoted to major-general,[2] and following the Spanish victory over the French at Bailén, in July, the Secretary of State for War and the Colonies, Viscount Castlereagh sent Leith at the head of a second delegation (the first, consisting of three British Army officers, led by a lieutenant colonel, had reached Gijón on 27 June 1808 to assess the state of affairs from a military viewpoint) to the Junta General of Asturias, with a view to seeing how the north of Spain could best be reinforced to prevent Napoleon sending in more troops through Irun, and isolating him in Madrid or Burgos.
On 7 January at Lugo, Leith's brigade mounted a successful bayonet charge, inflicting 300 casualties on Marshal Nicolas Soult's pursuing French for the loss of only 50 men.
The 5th Division fought well at the Battle of Bussaco in September 1810, helping to repel the French soldiers of Jean Reynier's II Corps.
During the winter of 1810–1811, Leith's soldiers helped man the Lines of Torres Vedras, keeping Marshal André Masséna's French army from capturing Lisbon.
[18] In recognition of his services in Spain Leith was made a Knight Companion of the Order of the Bath on 1 February 1813, and also received an honourable augmentation to his coat of arms.
[23][24] For his services in the Peninsula, Leith was awarded the Army Gold Cross and clasp for Corunna, Busaco, Badajoz, Salamanca, and San Sebastian.
On 2 February 1814 he received permission to accept and wear the insignia of an Honorary Knight Commander of the Order of the Tower and Sword, awarded to him by the Prince Regent of Portugal.
The Captain-General of Martinique, Pierre René Marie, Comte de Vaugiraud, assembled the troops, informing them that any of them could leave the island, but any attempt to revolt against the authority of the King would be met by force, and punished as an act of mutiny.
Meanwhile, Leith assembled his forces at Gros Islet Bay in Saint Lucia, and landed on Martinique on 5 July to occupy the military strongpoints of the island, with de Vaugiraud's willing co-operation.
[32][33] In recognition of his efforts on securing France's West Indies possessions, Leith was granted, on 20 November 1816, permission to accept and wear the Grand Cordon of the Order of Military Merit of France awarded to him by Louis XVIII:[34] Moody, Leith's aide-de-camp and deputy during these conflicts, was awarded a knighthood in the same order.