While he was on duty at Patuxent and in Washington, Glenn began reading everything he could about space, as part of research by the newly formed National Aeronautics and Space Administration (NASA). In 1958, NASA began a recruiting for astronauts. Glenn barely met the requirements; he was near the age cutoff of 40 and lacked a science-based degree at the time, but he was on a list of 110 test pilots who met the minimum requirements. In 1959 Glenn selected and assigned to the NASA Space Task Group at Langley Research Center in Hampton, Virginia. The task force moved to Houston in 1962, and became part of the NASA Manned Spacecraft Center.

On February 20, 1962 the Friendship 7flight launched, the 40 year old, Glenn into space, making him the first American to orbit the Earth; the third American in space, and the fifth human in space, making him a national hero and iconic figure in history. On February 23, 1962, President Kennedy awarded Glenn with the NASA Distinguished Service Medal. After meeting with the President, his fame and political potential were noted and he remained a close friend to the Kennedy family.

With talks of advancing plans to lunar landings, in the future. Glenn realized that he was the oldest member of the astronaut corps and would be close to 50 years of age by the time the lunar landings took place, it was unlikely that he would be selected for Project Apollo missions, he resigned from NASA on January 16, 1964, and announced his Democratic Party candidacy for the U.S. Senate from his home state of Ohio the following day. On February 26 he received a concussion from hitting his head on a bathtub, and withdrew his candidacy. He went on convalescent leave with the Marine Corps until a full recovery, which was required for his retirement. He retired as a colonel on January 1, 1965, and became an executive with Royal Crown Cola. In 1974, Glenn ran again for an Ohio Senate seat and defeated Howard Metzenbaum with a 54 to 46 percent win, launching a Senate career that would continue until December 1998.