Born the son of Colonel John Yorke and Juliana Yorke (née Dodd), Yorke was commissioned as an ensign in the 35th Regiment of Foot on 22 January 1808. Promoted to lieutenant on 18 February 1808, he transferred to the 52nd Light Infantry and served with that Regiment in the Peninsular War. During the War he was at present at the Battle of Vimeiro in August 1808, the Battle of Fuentes de Oñoro in May 1811, the Battle of Ciudad Rodrigo in January 1812 and at the Battle of Badajoz in April 1812, where he was wounded. After recovering, he went on to take part in the Battle of Salamanca in July 1812, the Battle of Vitoria in June 1813, the Battle of the Pyrenees in July 1813, the Battle of Nivelle in November 1813 and the Battle of the Nive in December 1813. After promotion to captain on 20 January 1814, he also fought at the Battle of Orthez in February 1814, where he was again wounded.