Cockburn was given command of the fifth-rate HMS "Phaeton" on the East Indies Station in July 1803, of the third-rate HMS "Captain" in July 1806, and of the third-rate HMS "Pompée" in March 1808. He commanded the naval support at the reduction of Martinique in February 1809 during the Napoleonic Wars, for which he received the thanks of Parliament.