Her wartime service between 1939 and 1943 mostly involved convoy escort duties off Africa, but in 1940 she also took part in Operation Catapult and Operation Menace, both targeting Vichy French forces at Dakar, Senegal, and in the Battle of Gabon, in which she damaged the Vichy French submarine Poncelet so severely that Poncelet's commander Bertrand de Saussine du Pont de Gault scuttled her, to ensure she did not fall into enemy hands.
[14][15] Milford returned to the United Kingdom for refitting at Portsmouth Dockyard in May 1935, having steamed over 50,000 nautical miles (92,600 km; 57,500 mi) in her first commission.
[13] In March 1938, Milford visited Tristan da Cunha,[16] and she was refitted at Naval Base Simon's Town in Simonstown, South Africa, from January to May 1939.
During the night of 7-8 July a motor launch from Milford sneaked past the French defences and dropped a number four depth charges under Richelieu's stern in an unsuccessful attempt to disable her screws,[17][18][19] then Fairey Swordfish torpedo bombers from Hermes attacked Richelieu, scoring one torpedo hit on the battleship, badly damaging the French ship.
[20] Milford subsequently returned to convoy defence duty at Freetown, but on 23 September 1940 she took part in Operation Menace, an unsuccessful attempt to seize Dakar by landing Free French forces with Royal Navy support.
At 07:45 Alpha Time on 7 November a Supermarine Walrus biplane flying boat from the heavy cruiser HMS Devonshire[22] returned from a reconnaissance flight to report that the Vichy French submarine Poncelet was anchored off Port-Gentil, 8 nautical miles (15 km; 9.2 mi) bearing 138 degrees from Cape Lopez.
[22][23] Milford was on antisubmarine patrol to the north and northeast of Cape Lopez, and at 15:52 Alpha Time, she reported that Poncelet — which had orders to attack the transports carrying the Free French invasion force[24] off Libreville[25] and was heading toward the Baie des Baleiniers[25] — had gotten underway.
[22] At 17:00 Alpha Time, Milford reported herself at 00°11′S 008°57′E / 0.183°S 8.950°E / -0.183; 8.950 and that Poncelet was 6.5 nautical miles (12.0 km; 7.5 mi) distant, making 16 knots (30 km/h; 18 mph) and steering a course of 39 degrees.
[22][26] Poncelet attempted to fire a second torpedo, but it got stuck in its tube, gave off toxic smoke into the interior of the submarine, and created a leak.
[22] The British light cruiser HMS Delhi received orders at 18:01 Alpha Time to close with Poncelet and put a prize crew aboard her.
[22] Milford transferred Poncelet′s survivors to Delhi at 07:45 Alpha Time on 9 November 1940 while a Walrus from Devonshire flew over the scene to provide antisubmarine cover.
[3] Between 8 January and 1 February 1941, Milford joined the escort of two military convoys during the leg of their voyages between Freetown and the Cape of Good Hope.
[3] Upon its completion, she remained at Simonstown from July to October 1941 to provide convoy defence in the South Atlantic and the Indian Ocean.
[3] In July 1942, Milford proceeded from Freetown to Rio de Janeiro, Brazil, for a refit in a Brazilian Navy dockyard.
[3] Milford returned to the United Kingdom in December 1943 and was laid up at Ardrossan, Scotland, due to the poor condition of her hull.
[3] The conversion included the removal of her antisubmarine warfare armament and the installation of a davit for torpedo recovery and a Type 271 surface search radar.