In January 1942, soon after the United States was brought into World War II, O’Brien was sent to join the Pacific Fleet. She was employed on patrol and convoy escort duties out of Pearl Harbor during March and April, then shifted to Samoa for more than a month of service in the south Pacific before returning to Hawaii. The destroyer began operations in support of the campaign to hold Guadalcanal, in the southern Solomon Islands, in mid-August 1942.
On 15 September, while serving with a carrier task force in the Guadalcanal area, O’Brien was hit in the extreme bow by a torpedo from the Japanese submarine I-19, only a few minutes after the same submarine had torpedoed the carrier Wasp (CV 7). While the damage appeared modest, the shock of the explosion had severely flexed the ship's lightly-constructed hull, much weakening her structure amidships.
After emergency repairs at Espiritu Santo, New Hebrides, and Nouméa, New Caledonia, she began the long transit back to the United States for permanent restoration, stopping at Suva, Fiji, in mid-October. However, while at sea off Samoa on 19 October 1942, O’Brien’s hull failed amidships. She began to break in two, sinking after her crew had abandoned ship. From her loss, the Navy learned important damage control and repair lessons that proved invaluable during the rest of the Pacific war.