Mackenzie was present as a midshipman in several actions between the British and French during the American War: under Augustus Keppel at Ushant in 1778; under John Byron at Grenada in 1779; under Rodney at Cape St. Vincent and Martinique in 1780; and the relief of Gibraltar under Earl Howe in 1782. He was eventually commissioned as a lieutenant on 3 March 1790, and was present as the first lieutenant of the frigate at the Glorious First of June in 1794.