The "Donegal" was paid off in 1811, and Malcolm was appointed to the , which he commanded off Cherbourg till March 1812, when he accepted the post of captain of the fleet to Lord Keith, his uncle by marriage. He was promoted to be rear-admiral on 4 December 1813, but remained with Keith till June 1814, when, with his flag in the "Royal Oak", he convoyed a detachment of the army from Bordeaux to North America, and served during the war with the United States as third in command under Sir Alexander Cochrane and Rear-admiral (afterwards Sir) George Cockburn. On 2 January 1815 he was nominated a K.C.B., and during "The Hundred Days' War" commanded a squadron in the North Sea, in co-operation with the army under the Duke of Wellington.