The former Ohio senator attended the ceremony in San Diego at General Dynamics' National Steel and Shipbuilding Company, along with his wife and daughter.
The 785-foot USNS John Glenn is a Mobile Landing Platform ship—a new type of amphibious staging and assault vessel. It's the second one ordered by the Navy to quickly transport troops and supplies to shore.
"What better name could adorn this ship than John Glenn—a risk taker, an innovator, a man who got the job done," said Rear Admiral Thomas Shannon during the nearly hourlong ceremony.
Admiral Jonathan Greenert, chief of naval operations, called the ship "a giant Swiss Army knife" that can serve combat and humanitarian missions.
Greenert said he wished the ship was available during the Philippine typhoon last year since it has 25,000 square foot of cargo space.
The 92-year-old Glenn, a Marine pilot during World War II and the Korean War, told the audience that he was proud of the ship bearing his name. He also paid homage to the people he served alongside.
"We're proud of this ship for them and along with my name on it. We're joint partners in this," he said.
To make the name official, Glenn's daughter, Lyn, broke a bottle of sparkling wine against the hull as attendees cheered and clapped.
In a statement, Secretary of the Navy Ray Mabus called the christening "a fitting tribute" to the man who in 1962 became the first American to orbit the Earth as a member of the Mercury 7 program, America's first corps of astronauts.
After the historic spaceflight, he ran for Senate and served for 24 years. In 1998, he returned to flying and became the oldest person to fly in space when he joined a space shuttle mission at the age of 77.