Martin was born in 1803, the second son of Admiral of the Fleet Sir Thomas Byam Martin, comptroller of the navy (1815–1831). Educated at the Royal Naval Academy, Martin first went to sea in October 1818. By 1840 he was captain of off the coast of Syria during the Egyptian–Ottoman War. Martin took part in actions off Tartus, and the capture of Acre on 3 November 1840. His actions earned him an appointment as a Commander of the Order of the Bath.