Stokes grew up in Scotchwell near Haverfordwest, Pembrokeshire. He joined the Navy on 20 September 1824. The first ship he served on was HMS Prince Regent, then in October 1825 he joined the crew of the Beagle under Captain Phillip Parker King. The Beagle was involved in a survey of the waters of South America. In 1828 the commander of HMS Beagle, Pringle Stokes (not related to John Lort Stokes), died and Robert FitzRoy assumed command; the ship returned to England in 1830 and was recommissioned. From 1831 to 1836 Stokes served on board when Charles Darwin undertook his voyages.
Following the second voyage of the Beagle, Stokes was promoted to the rank of lieutenant, and served under Commander John Clements Wickham for a survey of Australasian waters. When Wickham was invalided in 1841, Stokes took command of the ship. While Stokes was in command the Beagle surveyed Timor and New Zealand, returning to England in 1843. When he returned he wrote Discoveries in Australia, with an account of the coasts and rivers explored and surveyed during the voyage of the Beagle, 1837–1843; it was published in 1846.
In July 1846 Stokes was promoted to captain and commanded the steam ship Acheron surveying New Zealand for four years. From 1860 to 1863 he commanded a ship surveying the coasts of the English Channel. He retired in 1863, was promoted to the rank of rear admiral in 1863, vice-admiral in 1871 and admiral in 1877. He died at his home in Scotchwell.
^Although 1812 is frequently given as Stokes's year of birth, it has been argued by author Marsden Hordern that Stokes was born in 1811, citing a letter by fellow naval officer Crawford Pasco congratulating him on his birthday in 1852.