In 1799 he was given the command of a company in the newly formed Minorca Regiment which was posted to Egypt in 1801, where Wilson took part in the Battle of Alexandria.
In 1809 he was back on the Peninsular as part of the Loyal Lusitanian Legion under Sir Robert Wilson, harassing the French in the vicinity of Ciudad Rodrigo.
In 1813 he rejoined Wellington's army, commanding a Portuguese brigade at the Siege of San Sebastian, the Passage of the Bidassoa and the Battle of Nivelle.
Promoted Major-general in 1825, Wilson commanded the British troops in Ceylon from 1831 to 1839, acting as governor for a short period.
In 1835 he fought a duel with Charles Marshall, the Chief Justice, which took place in the Cinnamon Gardens, Colombo, once a plantation.