The ship was laid down as the U.S. Navy destroyer escort USS Dempsey (DE-267), the first ship of the name, by the Boston Navy Yard in Boston, Massachusetts, on 11 March 1943 and launched on 22 April 1943, sponsored by Mrs. J. A. Dempsey, mother of the late Lieutenant, junior grade Richard John Dempsey (1919-1942), for whom the ship was named. Dempsey was transferred to the United Kingdom under Lend-Lease upon completion on 23 August 1943.
Commissioned into service in the Royal Navy as HMS Cooke (K471) on 23 August 1943 simultaneously with her transfer, the ship served on patrol and escort duty. On 29 June 1944 she joined the British frigates,, and and a Royal Air Force Liberator aircraft of No. 244 Squadron in a depth charge attack that sank the German submarine U-988 in the English Channel west of Guernsey at 49.6167°N -3.6833°W. On 26 July 1944, she sank the German submarine U-214 with depth charges in the English Channel southeast of the Eddystone Rocks in position 49.9667°N -3.5°W.
The Royal Navy returned Cooke to the U.S. Navy on 5 March 1946.
The United States sold Cooke on 3 or 10 June 1947 (sources vary) for scrapping.