Hardwicke entered the Royal Navy in May 1815 as midshipman on , the flagship at Spithead. Later, he served in the Mediterranean, on (18) and (74) then subsequently (100), the flagship of Lord Exmouth, by whom he was entrusted with the command of a gunboat at the bombardment of Algiers. He later joined (60) under the flag of Sir David Milne, on the North American station, where he was given the command of the "Jane", a small vessel carrying dispatches between Halifax and Bermuda. He was then appointed acting lieutenant of (18) and after a few months commissioned in the rank of lieutenant in August 1819. The next October, he joined the frigate on the Halifax station, until appointed to the command of in 1823 on the Mediterranean station, in this post he was employed, before and after he obtained the rank of captain in 1825, in watching the movements of the Turko-Egyptian forces and in the suppression of piracy.