Virts was born in 1967 in Baltimore, Maryland, but considers Columbia, Maryland, to be his hometown. He graduated from Oakland Mills High School in Columbia, Maryland in 1985. He earned a bachelor of science degree in mathematics (with a French minor) from the United States Air Force Academy in 1989 and a master of aeronautical science degree in aeronautics from Embry-Riddle Aeronautical University in 1997. While at the Air Force Academy, Virts attended the École de l'Air in 1988 on an exchange program.
Virts was commissioned as a Second Lieutenant upon graduation from the United States Air Force Academy in 1989 and earned his pilot wings at Williams Air Force Base, Arizona. He completed basic fighter lead-in training at Holloman Air Force Base, New Mexico followed by formal training in the F-16 Fighting Falcon with the 56th Tactical Fighter Wing at MacDill Air Force Base, Florida. He was then assigned to the 31st Tactical Fighter Wing at Homestead Air Force Base, Florida. After Hurricane Andrew struck southern Florida in 1992, his squadron was moved to Moody Air Force Base, Georgia. He was later assigned to the 36th Fighter Squadron at Osan Air Base, Republic of Korea, and the 22nd Fighter Squadron at Spangdahlem Air Base, Germany. Virts was selected for Test Pilot School in 1997 at Edwards Air Force Base, California. Following graduation, he was an Experimental Test Pilot at the F-16 Combined Test Force. He has logged over 3,000 flight hours in more than 40 different aircraft.
Selected as a pilot by NASA in July 2000, Virts reported for training in August 2000. His technical assignments have included lead astronaut for the NASA T-38 program, Shuttle Avionics Integration Laboratory (SAIL) test crewmember, and Expedition 9 crew support astronaut. He was the pilot of STS-130 aboard Space Shuttle Endeavour and as of 2015 is assigned as a CAPCOM, communicating with station crews from mission control in Houston.
On November 23, 2014, Soyuz TMA-15M carrying Terry and two other astronauts launched from the Baikonur Cosmodrome, Kazakhstan. It successfully docked at the International Space Station roughly six hours later.
On February 28, 2015, following the death of beloved Star Trek actor, Leonard Nimoy, who famously portrayed Spock, Terry tweeted an image from the International Space Station of his Vulcan Cohanim-inspired salute (which had been improvised by the late actor when he was asked to portray an alien life form's desire that others live long and prosper) as the ISS flew over Boston, the city of Nimoy's birth.
With the impending scheduled departure of Soyuz TMA-14M in March 2015, Virts assumed command of the International Space Station as commander of Expedition 43.
Virts retired from NASA in August 2016.
Virts graduated with Academic Distinction from the United States Air Force Academy and Embry-Riddle Aeronautical University, was a distinguished graduate of Undergraduate Pilot Training at Williams Air Force Base, Arizona, and F-16 training at MacDill Air Force Base, Florida. His military decorations include the Meritorious Service Medal, the Air Medal, Aerial Achievement Medal, and the Air Force Commendation Medal.