Doyle threw up his staff appointment to serve in the expedition to Den Helder in 1799, but was again too late, and he was immediately afterwards appointed a brigade-major to the army, sailing under Abercromby for the Mediterranean. He was attached to Lord Cavan's brigade, and was present with it at Cadiz and Malta, and finally in Egypt, where he served in the battles of Abukir, Mandara, and Alexandria, in the latter of which he was severely wounded. While lying wounded at Rosetta he learned from some wounded French prisoners that the garrison of Cairo was weak, and by giving timely information to General Lord Hutchinson, he insured the fall of that city. He was heartily thanked by Hutchinson, and again recommended, for the fifth time, for a majority, which however he did not receive until after the conclusion of the Peace of Amiens, on 9 July 1803. In the same year he was appointed brigade-major to Sir James Henry Craig, commanding the eastern district. In 1804 he first commanded the volunteers and directed the defences of Scotland, for which he was thanked by General Sir Hew Dalrymple; he then commanded the light infantry on Barham Downs, and published his "Military Catechism", and was at the close of the year appointed assistant quartermaster-general in Guernsey. On 22 August 1805 Doyle was promoted lieutenant-colonel into his uncle's regiment, the 87th, and commanded it for three years during Sir John Doyle's lieutenant-governorship of that island.