Stewart joined the Royal Navy in about 1753. He attained the rank of Captain in 1762, the promotion being one of the terms of his surrendering his seat in Parliament. He commanded HMS Berwick in 1777. He served under Admiral Keppel in the action off Ushant on 27 July 1778.