Highly commended for his war service, Oswald later took an interest in politics, unsuccessfully attempting to enter parliament but using his influence in the army to support the Conservatives. He married twice and had several children, and was invested in two knightly orders following his retirement from the army in recognition of his service. He died in 1840 at his family estate in Fife.
The French Revolution and the consequent Reign of Terror resulted in the deaths of many of Oswald's school friends, creating in Oswald a lifelong hatred of the French Republic and the prinicples it was based on. At the outbreak of the French Revolutionary Wars, the 35th was ordered to the West Indies, Oswald resigning his appointment as a staff officer (brigade major) to accompany them. A few months later, Oswald was serving in the Caribbean with a detachment of local troops with the temporary rank of major. In this role he participated in the capture of Martinique, St Lucia and Guadeloupe and the invasion of San Domingo, before being sent back to Britain in 1795 to at as a reruiting officer. He was promoted to the regimental rank of major on 22 September 1795, and on 1 April 1797, Oswald purchased the rank of lieutenant colonel and command of the 35th.
When the Napoleonic Wars broke out in 1803, Oswald returned to Malta to rejoin his regiment. In 1805, the 35th was attached to General Sir James Craig's force that landed in Sicily and Oswald took part the following year in the invasion of Calabria under Sir John Stuart, fighting at the Battle of Maida and besieging Scylla Castle and forcing its surrender. On his return to Sicily, Oswald was appointed brigadier-general. He was promoted colonel on 2 November 1805.
In 1807, Oswald and the 35th were sent to Egypt under Alexander Mackenzie-Fraser participating in the Alexandria expedition of 1807 against the Ottoman Empire. Oswald was particularly noted for his actions in the storming of a Turkish trench line that forced the Ottoman troops to retreat into Alexandria's city walls. After the surrender of the city, Oswald advanced to Rosetta and there fought a running battle for fifteen days against superior Turkish forces before being ordered to withdraw. Returning to Sicily in 1808, Oswald was detached from his regiment and took command of a brigade, participating in raids on the Italian coast and commanding at first Augusta and subsequently Procida, which he had helped capture. In 1809, Oswald was given command of the force sent to invade the Ionian Islands, capturing Zante, Ithaca, Cephalonia and Cerigo.
In 1810, still in the Adriatic, Oswald gathered 2,000 British and Greeks soldiers and invaded Santa Maura, capturing the island in eight days despite some heavy fighting. For these exploits Oswald was made governor of the islands, simultaneously allowing the Greek population its first measure of independence, maintaining British rule and forming good diplomatic relations with the Turkish governors of mainland Greece. In 1811 he returned to Britain leaving Richard Church in command of the islands although Oswald retained the title governor until 1815. On his return, Oswald was promoted to major-general and married Charlotte Murray-Aynsley, granddaughter of the Duke of Atholl.
In October 1812, Oswald was attached to the general staff of the British Army in Spain fighting the Peninsular War. Oswald's arrival coincided with the army's retreat from Burgos, during which Oswald was with the Duke of Wellington at a cavaly rearguard action on 24 October and later that week took temporary command of the 5th Division. In command of this force, Oswald was engaged with the French at Villa Muriel and along the River Carrión and saw it into winter quarters on the River Douro. In the spring of 1813, Oswald commanded the division on Wellington's march through Spain and was engaged at the Battle of Osma on 17 June and the much larger Battle of Vittoria four days later.
Oswald was a staunch conservative who once ran unsuccessfully for Member of Parliament for the constituency of Fife. Oswald remained a popular figure in British society and politics until his death, noted for his bravery, good looks, public speaking and literary tastes. Following the death of his first wife in 1827, he married her cousin Emily Jane Murray. Oswald died on 8 June 1840 at his home in Fife.