In 1924 he was commissioned a second lieutenant of Infantry in the Officers Reserve Corps. He later transferred to the Judge Advocate General's Corps, and volunteered to serve in Europe during World War II. Pirnie served as a major on the staff of Theater Service Forces. He received the Bronze Star Medal for his wartime service, and he continued to serve until retiring as a colonel. In 1951 he was elected president of the Judge Advocate's Association. He was a longtime member of the board of visitors at the Judge Advocate General's School. Pirnie received the Legion of Merit at his 1963 retirement ceremony.
In 1958 Pirnie was a successful Republican candidate for the United States House of Representatives. He served six terms, 1959 to 1973. While in Congress, Pirnie was the ranking Republican member of the subcommittee that oversaw the 1969 draft for the Vietnam War. In this capacity he drew the first of the 366 capsules used to determine draft eligibility.
(The capsules contained birth dates from January 1 to December 31, including February 29, and individuals born on those days were subject to the draft based on the order in which their birth dates were drawn. The first capsule contained the date September 14, so those born on September 14 were assigned draft number 1. The last capsule drawn was June 8, and those born on that date were assigned draft number 366.)
Pirnie was a member of the Inter-Parliamentary Union from 1965 to 1982. After leaving Congress he practiced law in Utica and was president of a Mohawk, New York, clothing company from 1977 to 1980.
In retirement Pirnie resided in Utica. He died in Canastota, New York, on June 12, 1982. Pirnie was found behind the wheel of his car on the side of the road, and authorities presumed he had a heart attack and died while driving. He was buried in Pulaski Village Cemetery.
From 1964 until Pirnie's retirement, Sherwood Boehlert served on his Congressional staff. Boehlert later served as Oneida County Executive, and was a Member of Congress from 1983 to 2007.