Dunlap operated along the East Coast on training duty, and in June 1938 served as escort at Philadelphia for SS Kungsholm, carrying the Crown Prince of Sweden. On 1 September, she got underway for the west coast; except for a cruise to the Caribbean and east coast for a fleet problem and overhaul in the first 6 months of 1939, Dunlap served along the west coast until 2 April 1940 when she sailed for Pearl Harbor, her new home port.
On 7 December 1941, Dunlap was at sea bound for Pearl Harbor with TF 8 after ferrying planes to Wake Island. She entered Pearl Harbor next day and patrolled in the Hawaiian area until 11 January 1942 when she sortied with TF 8 for air strikes on the Marshalls, returning 5 February. After taking part in the raid on Wake Island of 24 February, she continued to patrol in the Hawaiian area until 22 March, and then escorted convoys between various ports on the west coast until returning to Pearl Harbor 22 October 1942.
Dunlap arrived at Nouméa, New Caledonia, 6 December 1942 and operated from that base on training and patrol duty, and as escort for convoys to the Fiji, Tonga and New Hebrides Islands until arriving at Guadalcanal 30 July 1943 for duty in the Solomons. On the night of 6-7 August, she was sent with five other destroyers to intercept a Japanese force carrying reinforcements to Kolombangara. In the resulting Battle of Vella Gulf, a brilliant night torpedo action, the ably handled task group sank three Japanese destroyers and drove the fourth back to its base at Buin. They suffered no damage themselves.
After overhaul at San Diego, Dunlap sailed 23 November 1943 for patrol duty out of Adak until 16 December when she left for Pearl Harbor, arriving 6 days later. She joined the Sixth Fleet to screen carriers in strikes of the Marshall Islands operations from 19 January to 4 March 1944, and then touched at Espiritu Santo briefly before sailing for Fremantle, Australia, to rendezvous with the British Eastern Fleet. After training here and at Trincomalee, Ceylon, she took part in the strikes on the Soerabaja area of Java on 17 May, and next day sailed for Pearl Harbor, arriving 10 June.
Dunlap returned to San Francisco 7 July 1944 to join the screen for Baltimore (CA-68) carrying President F. D. Roosevelt for conferences and inspections with top Pacific commanders of Pearl Harbor and Alaskan bases. Detached from this task group at Seattle 12 August, Dunlap returned to Pearl Harbor. She sailed 1 September, bombarded Wake Island 3 September and arrived at Saipan 12 September for duty with the Marianas Patrol and Escort Group.
Dunlap took part in the bombardment of Marcus Island on 9 October. On 16 October 1944, she rendezvoused with the Third Fleet units for strikes on Luzon, and then supported the landings At Leyte. When the Japanese forces made a three-pronged attack on the Philippines, she was underway for Ulithi but reversed course to screen TG 38.1 in its attacks of 25 and 26 October on the enemy fleeing after the decisive Battle for Leyte Gulf. Dunlap arrived at Ulithi 29 October for patrol duty and took part in the daring bombardments on Iwo Jima in November and December 1944 and January 1945. She returned to Iwo Jima 19 March to support its occupation, and until the end of the war patrolled to intercept Japanese ships attempting to evacuate the Bonins. On 19 June, she sank an enemy craft attempting to evacuate Chichi Jima, picking up 52 survivors. Japanese officers came on board 31 August to discuss surrender terms for the Bonin Islands, and returned 3 September to sign the surrender.
Dunlap sailed for Iwo Jima 19 September 1945 touched at San Pedro Calif., and arrived at Houston Tex., for Navy Day. She arrived at Norfolk 7 November where she was decommissioned 14 December 1945 and sold 31 December 1947.
Dunlap received six battle stars for World War II service.