Cotton was deployed to the Iberian Peninsula in April 1809, where he served as Adjutant-General to the Light Division under Brigadier-General Robert Craufurd. Cotton was present throughout the retreat to the lines of Torres Vedras and subsequent advance, seeing action at the Battle of Côa. On 12 June 1811 he attained the rank of Lieutenant-Colonel in the Third Guards and then returned to England in August. Cotton returned to the Peninsula in April 1813 and was involved in the Capture of Burgos on 10–12 June, which is different from the unsuccessful Siege of Burgos in 1812. He was then present at the decisive battles of Vittoria on 21 June 1813 and Nive on 9–13 December. Cotton then served in France, commanding the Light Division during the Passage of Adour on 23 February 1814. He was involved in the Siege of Bayonne and commanded the piquets of the Second Brigade of Guards on the night of the French Sortie, 14 April 1814. It was during the French sortie that, according to the writings of fellow Guards officer Captain Gronow, Cotton was taken prisoner. He "escaped by giving up his watch and all the money” on him, receiving a beating for “the smallness of the sum." Cotton returned to England with the First Battalion of the Third Guards in April 1814, but returned to France in June 1815 due to the loss of Second Battalion Officers at the Battle of Waterloo.