McNair departed New York on 5 March 1944 for the Pacific. By 14 June, as a unit of Destroyer Squadron 54 (DesRon 54), she was in the screen for the battleships that opened their guns against Japanese shore installations on Saipan. For the next 19 days, she provided fire support and carried out antisubmarine patrols. On 3 July, she was detached from TF 52 to escort ships between Eniwetok and Saipan. Rejoining that force on the 25th, she provided fire and screening support for the invasion of Tinian. Detached again 2 August, McNair steamed to Guadalcanal to prepare for the next offensive operation, the Palaus. From 6–21 September, she supported the land forces effecting the capture and occupation of the southern Palaus with counterbattery and harassing fire. After the battle of Angaur, she sailed south to Manus Island, the staging area for the Leyte invasion.
Arriving in the Leyte Gulf transport area on 20 October, McNair took up antisubmarine patrol duty to protect ships and troops as the latter began to storm the shore at Dulag. In the first hours of the 25th, she remained at her station to cover the entrance to Leyte Gulf as her sister ships of DesRon 54 conducted their much-heralded night torpedo attack on Japanese men-of-war steaming toward the northern end of Surigao Strait and defeat under the guns of Rear Admiral Jesse B. Oldendorf’s battleline.
The next day, she got underway for Hollandia where she took up escort work, ensuring the safe arrival of reinforcements at Leyte. Then she sailed back to the Solomons for rehearsals for the assault on Luzon. Clearing Guadalcanal on 25 December, she screened transports to Manus, continuing on to Lingayen Gulf with them on 2 January 1945. She entered the gulf on 11 January. There, until the 14th, she provided close fire support and met the attacks of kamikazes with skill. She then joined the fast carriers for strikes in support of the Iwo Jima offensive. By 16 February, she was 72 miles (133 km) off Honshū, screening the carriers as their planes struck at the Tokyo-Yokohama area, thus keeping Japanese planes at home while landings were made on Iwo. The force next moved south to provide air cover over the embattled island. On the 21st, McNair helped Saratoga fight off kamikaze and torpedo planes, splashing two of the latter, and then escorted her to Eniwetok for repairs.
On 18 March, the destroyer was back with the carriers for raids on the Nansei Shoto in preparation for the upcoming Okinawa campaign. On 1 April, they provided close support as troops landed on that enemy bastion. McNair remained off Okinawa to aid in fighting off the daily air attacks until 27 April, when she returned to Ulithi for repairs. Returning to Okinawa on 25 May, she conducted further shore bombardment and antiaircraft patrol missions before returning on 13 June to Leyte, the staging area of the fast carriers’ last deployment against Japan.
The force steamed north on 1 July, and for the next month and a half ranged the coasts of the enemy's home islands, raining destruction on industrial and military targets on Honshū, Hokkaidō, and the Kuriles. On 12 August, after her guns had pounded Paramushiro in the Kuriles, McNair headed for the Aleutians.
At Adak, Alaska on the 14th, she received news of the Japanese surrender and with that news, new orders to return to Japan for occupation duty in the Aomori-Ominato area. Two months later, on 12 October, she departed for the United States, arriving at San Francisco, Calif. on 4 November. At San Diego on 28 May 1946, she decommissioned and joined the Pacific Reserve Fleet.
1951–1963
In 1950, world tension increased as the divided country of Korea became the site of overt hostilities. McNair was soon taken out of mothballs, recommissioning 6 July 1951. Before the end of the year she had reported for duty in the Atlantic Fleet. On 6 September 1952, she departed her home port, Newport, R.I., for a world cruise that took her through the Panama Canal to Korea, where she served as gunfire support ship for United Nations troops and as guardian of carriers of the 7th Fleet. After 3 months in the combat area, she transited the Suez Canal en route home, arriving Newport 11 April 1953. In July she headed back across the Atlantic for a midshipman training cruise to northern Europe, followed by her first deployment with the 6th Fleet in the Mediterranean.
McNair remained on the east coast until 18 April 1956, when she sailed on 72 hours notice for the Middle East. There, she cruised the Red Sea and along the northern Egyptian coast until mid-July. On 20 July, she cleared Gibraltar and by the 28th was back at Newport.
Tension in the Middle East remained high, and in May 1957 McNair was back in the Mediterranean. Transiting the Suez Canal 22 May with her division, DesDiv 202, she again cruised in the Red Sea area until July. She then returned to the Mediterranean for 6th Fleet operations, departing for Newport 22 August. In June 1958, McNair again sailed eastward to help deal with another explosive situation in the politically unstable eastern Mediterranean area. From 23 July to 20 August she patrolled off Lebanon. In mid-September, tension decreased and the destroyer departed for Newport, arriving on the 30th.
McNair's 1959 6th Fleet deployment was followed by assignment to the 4th Naval District as a Naval Reserve training ship, based at Philadelphia, Penn. On 13 August 1961, the Brandenburg Gate between East and West Berlin was closed and construction on the Berlin Wall was begun by East Germany. As tension in the city, and the world, increased, Allied garrisons were reinforced and ships of the Allied navies stood by to await developments. McNair's reserve crew was recalled to active duty and the destroyer again joined the active fleet for operations along the east coast and in the Caribbean. In mid-February, she sailed on her last European deployment, a 5-month cruise to northern European ports. By 7 September, she had resumed her status as a Naval Reserve training ship and had returned her reservist crew to civilian life. In August 1963, she entered the Philadelphia Navy Yard for preinactivation overhaul. Decommissioning there on 30 December, she joined the Philadelphia Group, Atlantic Reserve Fleet.[citation needed]