She was repaired within a few months of the attack, and served in the Pacific through the rest of World War II, earning 11 battle stars.
Shaw remained on the West Coast until April 1940, participating in various exercises and providing services to carriers and submarines operating in the area.
In April, she sailed for Hawaii, where she participated in Fleet Problem XXI, an eight-phased operation for the defense of the Hawaiian area.
Back in the Hawaiian area by mid-February 1941, Shaw operated in those waters until November, when she entered the Navy Yard at Pearl Harbor for repairs, drydocking in YFD-2.
On 9 February, Shaw steamed towards San Francisco, where repairs were completed, including the installation of a new bow, at the end of June.
In mid-October, as a unit of a carrier force centered on the Enterprise, Shaw departed from Pearl Harbor and steamed westwardly.
Two days later, Shaw headed for the New Hebrides, where she commenced escorting ships moving men and supplies to Guadalcanal.
Now a unit of the 7th Amphibious Force, Shaw escorted reinforcements to Lae and Finschhafen for the remainder of October and during November.
Following an unsuccessful diversionary assault by Army troops against Umtingalu, New Britain, on 15 December, Shaw recovered survivors from two rubber boats and escorted HMAS Westralia and Carter Hall back to Buna, Papua New Guinea.
On 25 December, Shaw escorted units engaged in the assault against Cape Gloucester, where she provided gunfire support and served as fighter director ship.
The Shaw returned to Cape Sudest, New Guinea, on the 27th; she transferred her wounded and dead to shore facilities there, and continued on to Milne Bay for temporary repairs.
For the next three and one-half weeks, the destroyer rotated between screening and "call fire" support duties of the Marines on shore.
Convoy escort duties between the Philippines and New Guinea involved Shaw until the invasion of Luzon took place at Lingayen Gulf on 9 January 1945.
From the 9th to the 15th, she performed screening, "call fire" support for the soldiers ashore, night illumination with star shells, and shore bombardment missions.