Pilotfish was laid down by the Portsmouth Navy Yard, in Kittery, Maine, 15 May 1943; launched 30 August 1943; sponsored by Mrs. Martha Szolmeczka Scheutz; and commissioned 16 December 1943, Lieutenant Commander Robert H. Close in command.
After underway trials, training, and shakedown in the Portsmouth area, Pilotfish departed New London 29 March 1944 for the Pacific via the Panama Canal. She reported to Commander in Chief, Pacific Fleet 10 April and joined Submarine Division 202, Submarine Squadron 20.
On 16 May, Pilotfish departed on her first patrol in company with and . This patrol was begun in the area west of the Mariana Islands. After a week the group sailed to an area south of Formosa and patrolled across a probable route of reinforcement or retirement of the Japanese forced engaged in the Battle of the Philippine Sea. This proved fruitless and Pilotfish set course for Majuro Atoll, Marshall Islands, arriving 4 July.
Pilotfish departed 14 October via Midway Island on her third war patrol, again in the Bonins area. On 31 October she torpedoed and damaged a 4,000-ton cargo ship. On 2 November Pilotfish proceeded to the Nansei Shoto area for the balance of the patrol. After 57 days of patrol, she returned to Midway Island, arriving 10 December.
On 20 January 1945 Pilotfish departed on her fourth war patrol, in company with and . The group proceeded via Saipan to the East China Sea area, where a long patrol brought no contacts but a hospital ship and small craft. Pilotfish returned to Pearl Harbor, 25 March.
On 21 May Pilotfish departed for her fifth patrol. She spent fifteen days on lifeguard duty off Marcus Island, then proceeded to Tanapag Harbor, Saipan. On 20 June Pilotfish left for the second half of her lifeguard patrol in the vicinity of the Japanese Home Islands. Pilotfish arrived Apra Harbor, Guam, 14 July.
On 9 August Pilotfish departed on her sixth patrol, again to lifeguard duty. Only two days had been spent in the patrol area, southeast of Japan, when on 15 August the “Cease Firing” order arrived. Pilotfish remained on station off Kii Suido for continued lifeguard duty, and neutrality patrol. On 31 August Pilotfish rendezvoused with other ships and proceeded to Tokyo Kaiwan in order to participate in the initial occupation of Japan and the formal surrender ceremonies. The afternoon of 31 August all submarines of the formation moored alongside in Yokosuka Naval Basin. On 3 September, Pilotfish got underway for Pearl Harbor and San Francisco.
By directive dated 1 July 1946 Pilotfish was to be disposed of by use as a target for the Operation Crossroads atomic bomb test at Bikini Atoll. She decommissioned 29 August 1946 and was struck from the Naval Vessel Register 25 February 1947. Pilotfish received five battle stars for World War II service.