Throughout 1940 and 1941, the ship operated along the eastern seaboard. After drydocking and repairs in the fall of 1941, the ship left Norfolk on 15 January 1942 with Idaho and Mustin and steamed for the Pacific. Transiting the Panama Canal on the 20th, the trio arrived in San Francisco, 31 January 1942.
O’Brien sailed with a convoy for the western Pacific on 4 February, but was forced to return when a collision with destroyer Cassin damaged her port side. Following repairs at Mare Island, the ship sailed on 20 February via San Diego, to Pearl Harbor. There, Commander Destroyer Division 4 shifted his flag to O’Brien on 5 March.
After operating out of Pearl Harbor and patrolling French Frigate Shoals, the ship called at Midway in the latter part of March, escorting Curtiss to evacuate civilian personnel. The two returned to Pearl on 3 April 1942. After increase and improvement of her antiaircraft batteries, the ship embarked passengers for the Naval Air Station at Palmyra and sailed on 18 April with Flusser and Mugford. The DD then joined convoys from San Diego and Sari Francisco, escorting them to Samoa and arriving Pago Pago on 28 April.
O’Brien was retained at Pago Pago for local escort work. On 26 May she supported the occupation of Wallis Island, previously taken over by the Free French, and joined Procyon on 19 June for the return voyage to Pearl Harbor.
Operating out of Pearl Harbor, the ship performed escort duty and acted as patrol and plane guard. She got underway on 17 August 1942 with TF 17 to reinforce the South Pacific Force, screening the oiler Guadalupe. While escorting a convoy of transports enroute to Guadalcanal, joint TFs 17 and 18 were attacked by the Japanese submarines I-15 and I-19 on 15 September 1942. Wasp was sunk; North Carolina and O’Brien were damaged by torpedo attacks.
At 1452 that afternoon, O’Brien sighted smoke coming from Wasp. As a member of Hornet’s ASW screen, she made an emergency turn to the right. At about 1454, while accelerating and swinging right, her lookouts spotted a torpedo two points forward of the port beam 1,000 yards away. This torpedo missed close astern, but while attention was concentrated on it, another “fish” hit the port bow.
The explosion did little local damage, but set up severe structural stresses through the ship. Able to proceed under her own power, the destroyer on 16 September reached Espiritu Santo, where Curtiss made temporary repairs. O’Brien sailed on the 21st for Nouméa, New Caledonia for further repairs by Argonne before proceeding 10 October to San Francisco.
She made Suva on the 13th and sailed once more on the 16th. The rate of leaking continued to increase, and the 18th it was necessary for O’Brien to proceed to the nearest anchorage. Topside weight was jettisoned and preparations were made for abandoning ship, but it was still thought that the ship could be brought intact to Pago Pago, However at 0600 on 19 October, the bottom suddenly opened up considerably and the forward and after portions of the hull began to work independently. At 0630, all hands except a salvage crew went over the side, and half an hour later the ship was abandoned entirely. Just before 0800 she went under, after steaming almost 3,000 miles since torpedoed. All the crew were saved.
DD 415 earned one battle star during World War II.