Heathcote then went out to the East Indies commanding a ship of the line. After service transporting the ambassadors to Persia, he was based on the Indian coast. While there he took a bold decision to open despatches and then quit his post to deliver them to the station commanders, who were at the time involved in the Java Expedition. He was court-martialed for this, but though several charges were proved, he was judged to have acted in the service's best interests, and was acquitted. He went out to the Mediterranean late in the Napoleonic Wars, and commanded the inshore squadron during the blockade of Toulon. He led one of the last attacks on the French Mediterranean Fleet at the action of 5 November 1813, and retired ashore after the end of the wars. He developed a new technique for hoisting staysails, received further promotions, and a knighthood, while in retirement, before his death in 1851 at the rank of admiral.