The announcement came on the 30th anniversary of the first space shuttle flight and the 50th anniversary of man's first journey into space.
Shuttle Atlantis will stay in Cape Canaveral at the Kennedy Space Center Visitor Complex, just miles from the pair of launch pads where it was shot into space. Endeavour is headed to the California Science Center, miles from the plant where the shuttle was built; and Discovery's new home will be the Smithsonian Institution's branch in northern Virginia.
The Smithsonian is giving up the prototype Enterprise, which NASA said Tuesday will now go to New York City's Intrepid museum. Enterprise was used for test flights in the 1970s.
"For all of them, take good care of our vehicles," said NASA Administrator Charles Bolden, a former astronaut, as he choked up.
"They served a nation well, and we at NASA have a deep and abiding relationship and love affair with them that is hard to put into words."
Twenty-one museums and visitor centers around the country put in bids for the spaceships. NASA is giving shuttle simulators and other parts to some of them.
From the International Space Station, American astronaut Catherine Coleman told space center workers at the ceremony that the retirement of the space shuttle program should not be viewed as an end.
"It represents the next step in extending humanity's reach further into space," said Coleman, one of six people living on the orbiting outpost.
The shuttle program is winding down with only two more flights left. Endeavour is set to launch on April 29 and Atlantis will close out the shuttle program with a summer liftoff.
Russia spent Tuesday celebrating its space accomplishment in 1961 - the first human spaceflight by cosmonaut Yuri Gagarin. President Dmitry Medvedev said Russia must preserve its pre-eminence in space. But critics there complained the government has paid little attention to the space program in recent years.