She loaded depth charges at the mine depot at Yorktown before moving to the Naval Operating Base (NOB) at Norfolk before getting underway on 14 July for Wilmington, North Carolina.
Soon thereafter, a plane, identified as "British" (possibly Royal Canadian Air Force) by the wing markings, circled Anderson at low altitude, obviously scrutinizing the ship thoroughly before banking away and heading for the coast.
The destroyer then touched briefly at the Boston Navy Yard before she ran her final acceptance trials off Rockland, Maine, on 7 February 1940, with Rear Admiral H. L. Brinser, president of the Board of Inspection and Survey, embarked.
At 1130 on 12 April, the destroyer embarked the Honorable John Z. Anderson, a California Congressman and member of the House Naval Affairs Committee, and got underway shortly thereafter, reaching NOB, Norfolk, and mooring to Pier 7, at 2008 the following day, disembarking her passenger the next morning.
Lieutenant George R. Phelan, the executive officer, gathered men of the deck force in the lee of the galley, amidships, as the ship steered various courses in an attempt to lessen the roll and thereby facilitate efforts to secure the port lifeboat.
Anderson immediately called away her fire and rescue party and stopped to render assistance, help which turned out to be only giving directions to the tug which had become lost and needed the course to San Nicolas Island.
The ship also patrolled assigned areas adjacent to the Lahaina Roads anchorage, off Maui, and off Honolulu and Pearl Harbor, intercepting and identifying many merchantmen, and local craft, such as fishing boats, as well as noting the movements of American warships.
Following this intensive period of operations in Hawaiian waters, Anderson took a departure from Pearl Harbor on 2 December 1940, bound for the West Coast in company with the rest of Destroyer Squadron (DesRon) 8.
During flight operations on the morning of 17 March 1941, two TBD Devastators from Torpedo Squadron 5 collided at 1,000 feet (300 metres) and crashed into the sea, 2,500 yards (2.3 km) from the carrier.
After operating briefly in San Francisco Bay, Anderson shifted to Long Beach on 21 May, and eight days later, took a departure, ostensibly, for the Hawaiian Islands, in company with her division mates, Hammann, Mustin, and Rowan.
After a brief period in Bermudan waters, a break she utilized for a short stint of close-range battle practice, Anderson took a departure on 12 July for Norfolk, reaching her destination the following day.
Thus refitted to better perform the escort role needed in the developing Battle of the Atlantic, she participated in intensive antisubmarine exercises out of Provincetown, Massachusetts, during the latter half of August 1941 before returning to Boston on the 30th.
Moving down to Provincetown, Anderson again conducted antisubmarine exercises, and as in previous practices, the ship's performance was "outstanding in detecting the presence of a submarine and carrying out a successful attack."
On 30 October, 700 mi (1,100 km) from St. John's, Newfoundland, Yorktown had just completed recovering planes and was proceeding to refuel Sims when, at 1219, Anderson made an underwater contact, 1,300 yards (1,200 m) distant.
As Hammann parted company, Anderson investigated the stranger, finding her to be Trondheim, steaming singly from Belfast, Northern Ireland, to Halifax, Nova Scotia.
The ship's last "peacetime" operations consisted of a sweep, in company with Idaho and Mississippi from Reykjavík across the southern end of the Denmark Strait, between Iceland and Greenland, between 1 and 6 December 1941.
Anderson subsequently unmoored on the morning of 25 January, after having undergone a brief tender availability in a nest alongside Dixie and stood out of San Francisco Bay, bound for a rendezvous with Convoy 2019.
Hampered by the typical foggy conditions surrounding the bay area, assembly took some time, but ultimately, with all units present and accounted for, the convoy set out for the Hawaiian Islands.
Underway at 0817 on 16 February, Anderson stood out to sea, joining up with Task Force 17 (TF17), consisting of Yorktown, Astoria, Louisville, Hammann, Sims, and Walke, under Rear Admiral Frank Jack Fletcher, later that afternoon.
While Brown's and Fletcher's ships were en route to that area, however, Australian reconnaissance planes detected a Japanese invasion force moving toward the settlements of Lae and Salamaua, on the eastern coast of New Guinea.
He placed this force, Astoria, Chicago, Louisville, Australia, Anderson, Sims, Hammann, and Hughes, under Rear Admiral John G. Crace, Royal Australian Navy.
While the patrol proved uneventful for Grace's ships, which rejoined TF 11 on 14 March, the Lae-Salamaua raid carried out by planes from Yorktown and Lexington forced the Japanese to husband carefully their amphibious resources, already on the proverbial "shoestring", for their planned operations in the Solomon Islands.
With intelligence data indicating that the postponed movement against Tulagi, in the Solomons, was imminent—confirmed by the Japanese landing men and supplies there on 29 April and establishing a seaplane base on the heels of the retreating Australian garrison, TF 17 moved north to deal with this threat.
Reinforced on 6 May by Rear Admiral Aubrey W. Fitch's TF 11, Fletcher planned to meet the Japanese in the Coral Sea on 7 May, to stop the enemy thrust toward Port Moresby.
Her rest, however, was to prove short, for forces were needed to thwart a new Japanese thrust, this one directed at Midway Island to draw out the United States fleet in a decisive battle.
Confusion on the Japanese side as to what forces they found themselves facing proved fatal, as the American air attack from Yorktown, Enterprise, and Hornet caught the enemy at a vulnerable moment.
Yorktown, however, was underway again two hours later, her fires put out and power restored, and commencing to launch fighters when a second attack wave, this time composed of Nakajima B5N "Kate" torpedo planes, showed up.
In the developing melee, Anderson shot down one "Kate" before it had a chance to launch its torpedo, but others managed to penetrate the terrific barrage and drop their ordnance, scoring two hits on the carrier's port side amidships.
As Yorktown, mortally wounded, slowed to a halt for the second time that day, Anderson picked up Ensign Milton Tootle, IV, USNR, a pilot from Fighting Squadron 3 (VF-3) who had been shot down attacking a Japanese torpedo plane.
During the remainder of September 1942, Anderson escorted a Dutch convoy to Dumbea Bay, New Caledonia, then on 3 October sortied with TF 17 en route to launch an air attack against enemy vessels in the Buin-Faisi area.