Diplomacy and war with Mysore
Cornwallis had been sent to India with instructions to avoid conflict with the company's neighbors. Early in his tenure he abrogated agreements with the Maratha Empire and the Nizam of Hyderabad that he saw as violating the 1784 Treaty of Mangalore that ended the Second Anglo-Mysore War. This ensured the company's non-involvement in the Maratha-Mysore War (1785–1787). He was, however, manouevred into the establishment of a new company based at Penang (in present-day Malaysia), where conflict was avoided when he agreed to pay a stipend to the local rajah for use of the base. Fort Cornwallis in Penang is named for Cornwallis.
The King of Nepal appealed to Cornwallis in 1792 for military assistance. Cornwallis declined the king's request, sending instead Colonel William Kirkpatrick to mediate the dispute. Kirkpatrick was the first Englishman to see Nepal; by the time he reached Kathmandu in 1793, the parties had already resolved their dispute.
Main article: Third Anglo-Mysore War
The company was unavoidably drawn into war with Mysore in 1790. Tipu Sultan, Mysore's ruler, had expressed contempt for the British not long after signing the 1784 Treaty of Mangalore, and also expressed a desire to renew conflict with them. In late 1789 he invaded the Kingdom of Travancore, a company ally according to that treaty, because of territorial disputes and Travancore's harbouring of refugees from other Mysorean actions. Cornwallis ordered company and Crown troops to mobilize in response. The 1790 campaign against Tipu was conducted by General William Medows, and it was a limited success. Medows successfully occupied the Coimbatore district, but Tipu counterattacked and was able to reduce the British position to a small number of strongly held outposts. Tipu then invaded the Carnatic, where he attempted unsuccessfully to draw the French into the conflict. Because of Medows' weak campaigning, Cornwallis personally took command of the British forces in 1791.
When the war broke out, Cornwallis negotiated alliances with the Marathas and Hyderabad. Cornwallis ascended the Eastern Ghats to reach the Deccan Plateau in February 1791. After successfully besieging Bangalore, Cornwallis then joined forces with Hyderabadi forces that he described as "extremely defective in almost every point of military discipline", and their presence in the army ultimately presented more difficulties than assistance. These forces then marched toward the Mysorean capital at Seringapatam, and forced Tipu to retreat into the city at the Battle of Arakere on 15 May. Dwindling provisions, exacerbated by Tipu's slash-and-burn tactics, forced Cornwallis to abandon the idea of besieging Seringapatam that season, so he retreated to Bangalore.
In January 1792 the army, now well provisioned, set out for Seringapatam. Arriving before the city on 5 February, Cornwallis quickly eliminated Tipu's defensive positions outside the city, and then began siege operations. Tipu requested negotiations on 23 February, and peace was agreed in 18 March. Cornwallis and his allies demanded the cession of half of Mysorean territory, much of which went to the allies. As a guarantee of Tipu's performance, two of his sons were delivered to Cornwallis as hostages. Cornwallis and other British commanders, in a move appreciated by their soldiers, donated prize money awarded them to be distributed among the rank and file.
For his success in conducting the war, Cornwallis was created Marquess Cornwallis in 1792. He returned to England the following year, and was succeeded by Sir John Shore.