A statement from his family says he died from complications from heart surgery he had earlier this month.
He set foot on the Moon on 20 July 1969, famously describing the event as "one small step for man, one giant leap for mankind".
US President Barack Obama said Amstrong was "among the greatest of American heroes - not just of his time, but of all time".
Last November he received the Congressional Gold Medal, the highest US civilian award.
He was the commander of the Apollo 11 spacecraft. More than 500 million TV viewers around the world watched its touchdown on the lunar surface.
Armstrong and fellow astronaut Edwin "Buzz" Aldrin spent nearly three hours walking on the moon, collecting samples, conducting experiments and taking photographs.
"The sights were simply magnificent, beyond any visual experience that I had ever been exposed to," Armstrong once said.