Hamilton led a diversion at the Battle of Ramillies but turned the manoeuvre into a highly successful assault, from which he had to withdraw before leading the relentless pursuit of the defeated French troops in May 1706. He also took part in the siege of Menin in July 1706 and then played a major role at the Battle of Oudenarde in July 1708. He also saw action at the passage of the Scheldt in November 1708, fought at the siege of Tournai in June 1709 and led the charge of fifteen infantry battalions in an extremely bloody assault on the French entrenchments at the Battle of Malplaquet in September 1709. Promoted to general of foot in 1710, Hamilton was appointed Lord Lieutenant of Lanarkshire in 1711. He returned to the continent in 1712 and continued to serve in the Army commanded by the Duke of Ormonde besieging Douai and then Bouchain until 1713.