He saw his first service in the Peninsular War at the Battle of Roliça, where he was badly wounded and subsequently left the theatre. On 1 January 1812, he was breveted major and returned to the Peninsula, where he served until the end of the war. Promoted regimental lieutenant-colonel on 21 July 1813, after the battles of Nivelle and the Nive, Elphinstone commanded the engineers at the crossing of the Adour and the siege and battle of Bayonne.