Michael Griffin, Nasa administrator, said: "This agreement between Nasa and Google will soon allow every American to experience a virtual flight over the surface of the moon or through the canyons of Mars."
Google already draws upon some of Nasa's imagery to provide internet users with interactive tours of Mars as part of a nine-month-old service.
Ames and Google also have vowed to work together to solve complex computing problems, including large-scale data management.
Eric Schmidt, Google's chief executive, said: "Partnering with Nasa made perfect sense for Google, as it has a wealth of technical expertise and data that will be of great use to Google as we look to tackle many computing issues on behalf of our users."
Ames is located a few kilometres south of Google's Mountain View headquarters.