On 2 April 1940, Perry departed San Diego for her new homeport, Pearl Harbor. For the next five months she patrolled in Hawaiian waters, and then in October, entered the naval shipyard at Pearl Harbor for conversion to a high speed minesweeper. Redesignated DMS–17, effective 19 November 1940, she joined MinRon 2 at Pearl Harbor in January 1941. In late spring, she sailed back to San Diego, whence, on 1 July, she departed to escort Arizona to Pearl Harbor.
On 7 December 1941, Perry was moored at Pearl Harbor. Promptly after the Japanese attack she got underway and, having already splashed one of the attackers, took up patrol and sweeping duties in the approaches to the harbor entrance. She continued offshore patrols until 31 May 1942, and then sailed east to California. Alterations at Mare Island followed and on 31 July, she departed, as convoy escort, for Pearl Harbor. From Hawaii, she steamed to Kodiak to assist in the Aleutian campaign. For the next year, until after the retaking of Kiska, 15 August 1943, Perry performed minesweeping and rescue missions and escorted troop and supply convoys in the foggy waters of the north Pacific.
On 8 September, Perry departed Adak and sailed south. Stopping first in Hawaii, she continued on to San Francisco for repairs. Back at Pearl Harbor 27 November, she joined the 5th Fleet, then staging for the Marshall Islands campaign. On 31 January 1944, she arrived off Kwajalein and took up antisubmarine station in the transport area. She departed that atoll five days later, escorted troopships to Noumea, conducted sweeping operations in the Solomons, and then, on 3 April, sailed with MinRon 2 for New Guinea. Three days later, she joined the 7th Fleet at Milne Bay. In mid-month she got underway, with TG 77.3 and, acting as ocean escort and anti-submarine screen, arrived with that group off Aitape on the 22nd. Prior to the assault there, she swept between Tamara and Alli Islands, and then took up antisubmarine patrol and shore bombardment duties.
Perry remained in New Guinea waters until 6 May, when she steamed east to rejoin the 5th Fleet in the Solomons and prepare for the invasion of the Marianas. Assigned to TG 51.17, Perry arrived off Saipan and commenced sweeping operations 13 June—under cover from the battleships of TF 58. Completing sweeping operations the following day, she resumed screening duties in the forward area, maintaining her protective posture over the transports off the assault beaches through the landings and the Battle of the Philippine Sea. On 26 June, she departed Saipan for Eniwetok, whence she sailed, with TG 53.1, for Guam. Between the 14th and the 20th she screened vessels delivering the preinvasion bombardment; then, as troops were landed on the 21st, joined the screen of the fire support units.
Prior to departing the Marianas, five days later, Perry participated in the shelling of Rota, and then returned to Guam, whence she sailed, the same day, for Eniwetok in the transport screen. Further exercises in the Solomons preceded her next, and last, assignment, the Palau invasion.
On 6 September MinRon 2 sortied from Florida Island. On the 12th they reached their objective and the units commenced sweeping operations off Pelelieu Island. At 0811, a mine explosion destroyed Perry’s port sweep gear. By 1028 she had replaced the gear and was back in formation to continue operations until early afternoon. That night she carried out antisubmarine patrols and early the next morning, 13 September, resumed her sweeping mission. At 1418, off Anguar, a violent underwater explosion, starboard side amidships, shook the ship. All steam to her main engines was lost and the forward fireroom was demolished and flooded. Steam and oil sprayed in all directions and the ship took on a 30’ list to port. The list increased and, at 1420, the commanding officer ordered “abandon ship”. With the aid of Preble (DD–345) final attempts to save the vessel were made, but, at 1515, all remaining personnel were ordered off. At 1605, Perry capsized. She broke in two at the point of damage and, at 1607, sank in 40 fathoms of water.
Perry earned 6 battle stars during World War II.