In June 1788, Pym joined the Royal Navy as captain's servant of the frigate Eurydice.
From November 1798, Pym served aboard the Ethalion (36), taking part in the capture of the Spanish Thetis and Santa-Brigida in 1799.
From April 1804, Pym served aboard the Mars, and from June on the 74-gun Atlas, under the overall command of Sir John Thomas Duckworth.
In 1810, Pym was sent to the Isle de France (now Mauritius) to lead a squadron consisting of the frigates Sirius, Iphigenia, Nereide, and the brig Staunch.
Pym was released in December when Sir Albemarle Bertie recaptured the Île de la Passe.