She was in Floating drydock on December 7th, 1941 for the Japanese Attack on Pearl Harbor. Hit by three bombs, her forward magazine exploded, severing the bow. After the attack, a temporary bow was fixed in place and Shaw steamed under her own power to the Mare Island Shipyard in California, where a new bow section was waiting for her.
Following repair, Shaw was returned to service and served the rest of the war in the Pacific theatre, earning eleven battle stars before the war ended.