USS Whale (SS-239), a Gato-class submarine, was the second ship of the United States Navy to be named for a whale, an extremely large, aquatic mammal that is fishlike in form. The USS Cachalot (SS-170) (Cachalot, another name for a Sperm Whale) commissioned on 1 December 1933 preceded the Whale.

Her keel was laid down on 28 June 1941 by the Mare Island Naval Shipyard of Vallejo, California. She was launched on 14 March 1942 (sponsored by Mrs. A. D. Denny, wife of Captain A. D. Denny, the commanding officer of the shipyard), and commissioned on 1 June 1942, with Lieutenant Commander (Lt. Cmdr.) John B. Azer in command.

Dock trials and initial shakedown training commenced on 30 July. The submarine—escorted by destroyer —departed San Francisco, California, on 4 August and arrived at San Diego, California, two days later. Between 30 July and 9 September, she conducted type training in the San Diego and San Francisco areas.

First war patrol, October – November 1942 Whale got underway from San Francisco on 23 September and arrived at Pearl Harbor four days later. The submarine departed Hawaii on 9 October 1942, headed via Midway Island for "Imperial Waters" (the seas surrounding The Empire of Japan), and conducted training dives and battle surface drills en route. She arrived at her assigned patrol area off Kii Suido on 25 October and began to reconnoiter the vicinity which had been designated for a naval minefield. Her original plans had called for the submarine to lay mines offshore. However, after sighting several outbound freighters about from the coast, executive officer Frederick "Fritz" Harlfinger II (who later commanded ) convinced Azer that the mines be planted as close in as possible. Hence Whale's first war patrol was conducted "within spitting distance" of the Japanese beach. Whale was the first American submarine to plant mines in Empire waters. During the war, no one on the American side knew how effective these mines proved to be, but a postwar analysis of Japanese shipping records credited Whale's minefield with sinking five enemy ships.

The following day, Whale arrived at Seto Saki hoping to intercept some inbound freighter traffic. By the light of a full moon, she sighted a large freighter directly ahead and fired a three-torpedo spread at the target. Two torpedoes hit the cargo ship, and she went down by the bow with her screws in the air. Whale sighted a second target astern of the freighter, launched three torpedoes, and observed that target listing slightly to port and heading for the beach. Whale fired a stern shot at a third freighter and heard a heavy torpedo explosion after 43 seconds.

From 27 to 29 October, Whale patrolled the entrance to Bungo Suido. On 30 October, while off Ichie Saki, Whale spotted two freighters and a torpedo boat as escort; she launched two torpedoes at each of the ships, but scored only one hit. The torpedoes alerted the escort which bore down on the submarine and attacked her with depth charges. A 17-hour chase ensued in which Whale was badly damaged yet managed to shake the torpedo boat three times.

After an unsuccessful search for a disabled sampan, Whale made rendezvous with an escort and proceeded to Pearl Harbor where she underwent repairs from 10 November 1942 through 2 January 1943. The next day, Whale got underway from the Submarine Base, Pearl Harbor, bound for the Marshall Islands. After conducting training dives and drills en route, she arrived in the Wotje and Kwajalein area on 10 January for two days' patrol off those atolls.

Second war patrol, January – February 1943 On 13 January 1943, Whale began cruising the shipping lane from Kwajalein to Truk. She sighted a freighter and pursued her quarry for before finally managing to work into position dead ahead of the target. She then launched four torpedoes. The first hit struck the freighter aft and broke off about of the stern; the second struck just forward of the bridge, and the fourth also exploded on target. Within six minutes, 3,559 ton Iwashiro Maru had sunk about 40 nautical miles north of Kwajalein, 09°54'N, 167°07'E., and Whale resumed her voyage toward Truk, running submerged.

Whale conducted surface patrols on the Truk-Empire shipping lanes until 17 January when she sighted a passenger/freighter bringing in troop reinforcements. Through the periscope, Whale observed hundreds of uniformed soldiers crowding the decks. She fired nine torpedoes and scored eight direct hits. All hits were necessary to sink the 9,816 ton Heiyo Maru north-east of Truk in position 10°13'N, 151°25'E.; the cargo must have been of such a nature as to prevent her from sinking more rapidly.

The next seven days were spent patrolling the Caroline Islands. On 25 January while on a surface patrol along the Truk–Empire line, Whale sighted smoke in the bright moonlight and fired a three-torpedo spread from the stern tubes at the target. Only one torpedo scored a hit. The damaged tanker, Syoyo Maru, sent up a flare which summoned an escort to her rescue. Whale went deep and sustained light damage from several depth charges.

The following evening, Whale sighted the smoke of a steamer about on her starboard bow. She closed and launched one torpedo. A dull thud was heard throughout the boat, and no explosion occurred. The next morning (27 January), the submarine fired a three torpedo spread at the steamer but heard no explosions. A fourth torpedo also failed to explode, and the target, transport Shoan Maru (5624 GRT) attacked in the central Pacific in position 14°24'N, 153°30'E.turned away from the submarine, presenting only her stern to view. Whale fired a fifth and sixth torpedo; the latter passed directly below the target's stern and must have run under its full length without detonating. The Japanese ship then began dropping depth charges as she drew away. Whale fired her last remaining torpedo which hit the target just abaft her stack, causing her to lose power. Although Whale was credited with the kill, the Shoan Maru is towed to Saipan and grounded. After this action, Whale set her course for Midway, where she arrived 2 February 1943 and commenced preparations for her next patrol.

Third war patrol, February – April 1943 Refitting was completed on 16 February. Four days later, Lt. Cmdr. Azer was relieved of command by Lt. Cmdr. Albert C. Burrows. On the last day of the month, after various test dives and underway tests, Whale got underway for the Mariana Islands on her third war patrol. She arrived off Tanapag Harbor, Saipan, on 10 March and began patrolling the shipping lanes between the Mariana Islands and Japan.

On the evening of 19 March, Whale sighted two large freighters and one torpedo boat or destroyer as escort. Just after daylight the next morning, the submarine finally worked into a favorable attack position; she fired spreads of three torpedoes at each freighter, and hit both. The first target, tentatively identified as Mogamigawa Maru, sank rapidly by the stern. The second, a cargo ship resembling Arizona Maru, was plagued by several heavy internal explosions following a second torpedo hit. Whale, mistaking these secondary explosions for bombs, went deep. Upon discovering her mistake, she started to surface but was greeted by a barrage of depth charges from the escort. Whale dove again but again came under attack – this time from the air – when she attempted to return to examine the wreckage. The submarine suffered extensive damage during this attack, which prevented her learning the fate of her targets. This was by far Whale'''s closest escape.Whale continued to patrol shipping lanes to Kobe and Tokyo and, while off Tanapag Harbor on the evening of 22 March, she sighted the masts of two ships and the smoke of a third, all leaving the harbor. Whale tried to close but lost contact. The next morning, the submarine gained a position ahead of two freighters and fired two spreads of three torpedoes each. Two hits were observed on each target, one under each stack and a second under each stern. The closer freighter, Kenyo Maru, blew up with a tremendous explosion and sank in four minutes leaving no survivors. Part of the stern of the farther ship blew into the air, and she appeared to be sinking slowly by the stern as she signaled rapidly with a blinker light.

Fearing the approach of an escort, Whale fired a fourth torpedo which ran "hot, straight and normal" for one minute, then circled, heading back in the direction of Whale. "We went to and prayed", the commanding officer later reported. The erratic torpedo changed its mind after reaching Whales beam and headed back for the freighter, finally exploding. The target was awash from stern to stack and on fire forward. At morning twilight, the ship was still burning with her bow up and her stern under.

The submarine spent the next two days patrolling the Kobe-Saipan, Empire-Truk shipping routes. On the morning of 25 March, she sighted the smoke of a small freighter and pursued it throughout the remainder of that day and the next, firing seven torpedoes at the target, all misses. Either the target's draft had been overestimated or the torpedoes ran too deep, or both. This poor torpedo performance was bitterly disappointing to the submarine's crew. "The thought of the fuel expended," her commanding officer lamented, "on the long, endaround runs, coupled with the loss of the torpedoes themselves, made 'heartbreaking' but an inadequate euphemism."

On 28 March, Whale was on the surface, intending to cross the Saipan-Truk route, when she spotted the smoke of a small freighter headed for Truk. She fired a three torpedo spread; the target made an unanticipated zig, and all three torpedoes missed. A lack of fuel forced Whale to abandon her quarry, and she headed north along the Empire–Truk route.

Whale headed homeward on 31 March, and she arrived at Midway on 6 April. She refueled there, had her last torpedo removed, and sailed for Hawaii the following day, conducting daily training of gun crews and test dives for radio reception en route. She arrived at Pearl Harbor on 11 April and underwent refitting, subsequent tests, and then training. Whale got underway westward again on 5 May and arrived at Midway four days later to undergo repairs to her hydraulic system and her air search radar. Whale departed Midway to begin her fourth war patrol on 10 May.

Fourth war patrol, May – June 1943 Whale was ordered to take station east of Wake Island at 05:00 on 16 May, to assist in guiding in the Army Air Corps B-24 Liberator bombers to that island for a bombing attack and to pick up the crews from any plane that was shot down or ditched. She arrived on 15 May and was ordered to remain on the surface until released by the Bombardment Group Commander or attacked by the enemy. Whale sat surfaced in broad daylight until 09:45 waiting for the bombing to commence. At that time, observers on the submarine saw a flight of seven Liberators heading for Wake, and the attack began. Radar picked up a contact at and coming in fast. As Whale submerged, a bomb exploded astern of the submarine, causing no damage. At 19:22, Whale received a message releasing her from duty, and she proceeded to the Saipan area.

From 20 – 24 May, Whale patrolled the shipping lanes between Japan, Truk, and Saipan. On the latter day, she conducted a search for a submarine base reportedly on Rota; finding nothing, she surfaced and headed for Guam.