The Star Trek legend was given the Distinguished Public Service medal, the highest award bestowed by the agency to non-government personnel.
It was presented to him at a ceremony in Los Angeles at his annual Hollywood Charity Horse Show on Saturday.
David Weaver, NASA’s associate administrator for the Office of Communications, said: "William Shatner has been so generous with his time and energy in encouraging students to study science and math, and for inspiring generations of explorers, including many of the astronauts and engineers who are a part of NASA today.
"He's most deserving of this prestigious award."
Shatner's space-related work did not end with his portrayal of Captain James Tiberius Kirk, commander of the starship USS Enterprise in the 60s and 70s.
He continues to be an advocate for the work of Nasa, most recently recording voice overs for a number of projects.
Shatner donated his time and vocal talent to host the NASA documentary celebrating the 30th anniversary of space shuttle missions. To honor the final flight of shuttle Discovery in 2011, he agreed to recreate his famous Star Trek television introduction in one of the last wake-up calls for the astronauts of the STS-133 mission.
In 2012, he hosted a video presentation previewing the dramatic mission of the Mars rover Curiosity and voiced his support for NASA spinoff technologies that come as a result of investments in science, technology and exploration.
Other past recipients of the NASA Distinguished Public Service Medal include astrophysicist Neil deGrasse Tyson, former NASA Jet Propulsion Laboratory director and Voyager project scientist Edward Stone, theoretical physicist and astronomer Lyman Spitzer, and science fiction writer Robert Heinlein. The award is presented to those who “… have personally made a contribution representing substantial progress to the NASA mission. The contribution must be so extraordinary that other forms of recognition would be inadequate.”
Besides his acting and directing talents, Shatner is a prolific author, having taken the reins for nearly 50 books, and is an accomplished horse rider and breeder.