Slayton joined the U. S. Army Air Corps during World War II, and flew in Europe and the Pacific. He left the Army after World War II, and later joined the Minnesota Air National Guard after working for Boeing as an aeronautical engineer. He joined the U. S. Air Force, and attended the Air Force Test Pilot School in 1955. In 1959, he applied to, and was selected as one of the Mercury Seven. He was scheduled to pilot the second U. S. crewed orbital spaceflight, but was grounded in 1962 by atrial fibrillation, an irregular heart rhythm. In March 1972, he was medically cleared to fly, and flew as the docking module pilot of the 1975 Apollo–Soyuz Test Project (ASTP). He continued to work at NASA until 1982, and helped develop the Space Shuttle.