He was a mission specialist on the Atlantis space shuttle flight in September 2000 to prepare the International Space Station (ISS) for the arrival of the first resident crew. Mastracchio joined the Johnson Space Center in 1987 and became an engineer for NASA in 1990. His 2004 flight was postponed following the 2003 Columbia space shuttle disaster. He has since made three other space flights: space shuttle Endeavour mission STS-118 to the ISS (August 2007); space shuttle Discovery mission STS-131 to the ISS (April 2010); and Soyuz flight to the ISS for Expedition 38/39, during which he performed three EVAs. He was selected as an astronaut in 1996 and retired from NASA in June 2017.