The ship was ordered as the U.S. Navy destroyer escort DE-270 on 25 January 1942 and assigned the name USS Gillette, the first ship of the name, on 23 February 1943. She was laid down by the Boston Navy Yard in Boston, Massachusetts, on 7 April 1943 and launched on 19 May 1943, sponsored by Mrs. Thomas O'Dea. The United States transferred the ship to the United Kingdom under Lend-Lease upon completion on 8 September 1943.
Commissioned into service in the Royal Navy as HMS Foley (K474) on 8 September 1943 simultaneously with her transfer, the ship served on patrol and escort duty. On 21 November 1943 she joined the British sloop in a depth-charge attack that sank the German submarine U-538 in the North Atlantic Ocean southwest of Ireland at position 45.6667°N -19.5833°W.
The Royal Navy returned Foley to the U.S. Navy at Harwich, England, on 22 August 1945.
The ship was commissioned into the U.S. Navy as USS Foley (DE-270) on 22 August 1945 simultaneously with her return . She moved to Trinity Bay on 28 August 1945, and on 29 August 1945 departed Trinity Bay as a part of Task Group 21.3. She crossed the Atlantic Ocean, called briefly at Naval Station Argentia in the Dominion of Newfoundland, and arrived at the Philadelphia Naval Shipyard in Philadelphia, Pennsylvania, on 10 September 1945. She remained there until decommissioned on 19 October 1945.
The U.S. Navy struck Foley from its Naval Vessel Register on 1 November 1945. She was sold on 19 June 1946 for scrapping.