After fighting at the Battle of Sabugal in April 1811 and the Battle of Fuentes de Oñoro in May 1811, Cotton was promoted to the substantive rank of lieutenant general on 1 January 1812. He took part in the Battle of Salamanca in July 1812, where he was second-in command of the Army. During the engagement he successfully led a cavalry charge against Maucune's division, leading Wellington to exclaim, "By God, Cotton, I never saw anything so beautiful in my life; the day is "yours"." According to Wellington's subsequent despatch, "Cotton made a most gallant and successful charge against a body of the enemy's infantry which they overthrew and cut to pieces." At the end of the battle he was accidentally shot by a Portuguese sentry. In recognition of his gallantry he was appointed a Knight of the Order of the Bath on 21 August 1812 and an honorary Knight Grand Cross of the Portuguese Military Order of the Tower and Sword on 11 March 1813.