Her keel was laid down on 2 October 1944 by the Portsmouth Navy Yard in Kittery, Maine. She was launched on 26 January 1945 sponsored by Mrs. Allen J. Ellender, wife of Senator Ellender of Louisiana, and commissioned on 14 May 1945 with Commander J. D. Crowley in command.
After shakedown in the New London, Connecticut, area, Irex sailed for the Pacific via the Panama Canal. While she was in the Canal Zone, the war ended. Irex was ordered to Key West, Florida, where she joined Submarine Squadron 4. She spent the remainder of the year there and at Guantanamo Bay conducting exercises. By December 1946 the Navy had completed plans for the modern telescopic snorkel (a device to enable diesel-powered submarines to run submerged for long periods of time), and Irex was ordered to Portsmouth for installation and test of this equipment. She spent July 1947 to February 1948 evaluating her new apparatus and then joined Submarine Squadron 8 at New London as the U.S. Navy's first operational snorkel submarine.
For the next three years Irex trained out of New London and off the Virginia Capes. In May 1951 she was assigned patrol duty in the North Atlantic and in August commenced operations out of Key West and Cuba. Returning to New London in the fall, Irex continued her important training out of New England and in the Caribbean Sea until 26 October 1953 when she sailed for the Mediterranean Sea to join the Sixth Fleet. Returning to New London 3 February 1954 Irex resumed her operations along the East Coast and in the Caribbean for the next two years.
Irex again deployed in 1956 to the Mediterranean with units of the Sixth Fleet. In the developing Mid-East crisis that culminated in the nationalization of the Suez Canal in July 1956, and armed conflict between Egypt and the forces of France, Israel, and the United Kingdom, U.S. Naval forces acted early to support America's policy. In February, patrols in the Red Sea and along the Israeli-Egyptian border were established as a means of expressing American interest in the peaceful outcome of the crisis. Returning to New London, she resumed her operations and also served as training ship for submarine students.
During early 1957 Irex participated in fleet exercises and again served as training ship. In July she entered Philadelphia Naval Shipyard where she was fitted out with a new type plastic sail. The plastic sail, which replaced the World War II conning tower, is lighter in weight, higher, and acts as a stabilizer. With the exception of one tour to the Mediterranean (13 September – 20 December 1958) and training cruises to Bermuda and Halifax, Nova Scotia, Irex continued her operations out of New London for the next year and a half. In early 1960 she took part in fleet exercises in the North Atlantic before returning home 3 March. After operations out of New London, and a training cruise to Halifax, Irex deployed 1 August 1961 for submarine warfare training with the Sixth Fleet in the Mediterranean. She returned to New London in November, ranging south to Bermuda and north to New York City and Boston, Massachusetts, as she trained reservists and men of the New London Submarine School. She based winter operations January to March 1963 from Puerto Rico and the Virgin Islands, then was overhauled in the Philadelphia Naval Shipyard before resuming training at New London. In October 1964 she again sailed for the Mediterranean, taking time out during this Sixth Fleet tour to transit Suez Canal for CENTO exercises in the Red Sea and Arabian Sea. She returned home mid-January 1965 to aid in the development of antisubmarine warfare tactics, joined U.S.-Canadian warfare exercises reaching northward to Nova Scotia, then returned home to New London in November 1965 and continued local training duties into 1967.