Walker spent his early years in the navy at first in British waters during the invasion scares of 1779, and then in North American waters where he saw action at most of the decisive naval battles of the war, particularly at the Chesapeake, St. Kitts and the Saintes. He reached the rank of lieutenant before the end of hostilities and spent the interwar years travelling on the continent. Returning to service with the outbreak of war with the French, he again participated in many of the key naval actions of the period, with his service at the Glorious First of June securing his promotion to his own commands. His career was almost ended with an accusation of disobeying orders, which led to his dismissal from the navy, but he was reinstated in time to develop a plan to subdue the mutinies at Spithead and the Nore. He commanded a ship at the Battle of Camperdown, and another at the Battle of Copenhagen, earning Nelson's praise for his actions.