From 1803 to 1805 he was assigned to the Home Staff, temporary commanding one of the infantry brigades (Hanoverian) of the King's German Legion in the Hanover Expedition in 1805.
Mackenzie Fraser did first occupy Alexandria to secure the port as a base for Mediterranean operations and to prevent the French from making strategic use of it.
Attempts to push inland, however, were not a success, with Fraser losing the two engagements at Rosetta (modern Rashid) on 29 March and 21 April, with two battalions suffering very heavy casualties, particularly in the later ambush.
[citation needed] During the Peninsular War Mackenzie Fraser commanded the 3rd Division in Portugal and Spain during 1808–1809, and was present at the Battle of Corunna.
He again commanded a division during the Walcheren Campaign of 1809, dying at Hayes, Kent, from complications brought on by the illness he suffered there.