When the security patrol was begun on the west coast in 1940, Cummings served on it, intermittently, while continuing to conduct exercises in anti-aircraft and submarine tactics and target practice.
Except for a west coast overhaul and cruises to Tutuila, Samoa, Auckland, New Zealand, and Tahiti between 4 March and 3 April 1941, she remained in Hawaiian waters conducting patrols and constantly exercising and drilling.
When the Japanese attacked Pearl Harbor on 7 December 1941, Cummings weathered the bombs that fell ahead and astern, receiving only minor casualties from fragments, and sortied on patrol almost immediately.
The ship began patrol and escort missions for the Guadalcanal operation from bases at Espiritu Santo and Nouméa until 17 May 1943, and then sailed to Auckland, New Zealand, for a brief overhaul.
Assigned to the 5th Fleet, Cummings sortied on 19 January 1944 for operations in the Marshall Islands, accompanying carriers for air strikes on Wotje and Eniwetok until 21 February.
Departing Seattle 13 August 1944, Cummings joined TG 12.5 at Pearl Harbor for an air strike and shore bombardment of Wake Island on 3 September.
Cummings interrupted this duty to join the repeated strikes on Iwo Jima from 8 December 1944 to 19 March 1945, supplying fire support for the invading troops.