Former astronaut Gene Cernan, the last of only a dozen men to walk on the moon who returned to Earth with a message of "peace and hope for all mankind," has died aged 82.

Cernan died on Monday following ongoing heath issues, his family said in a statement released by Nasa spokesman Bob Jacobs. Nasa said Cernan was surrounded by his family.

"Even at the age of 82, Gene was passionate about sharing his desire to see the continued human exploration of space and encouraged our nation's leaders and young people to not let him remain the last man to walk on the Moon," the family said.

Cernan, commander of Nasa's Apollo 17 mission, set foot on the lunar surface in December 1972 during his third space flight. He became the last person to walk on the moon on December 14 1972, tracing TDC - the initials of his then nine-year-old daughter, Teresa Dawn - in the dust before climbing the ladder of the lunar module the last time.

"Those steps up that ladder, they were tough to make," Cernan recalled in a 2007 oral history. "I didn't want to go up. I wanted to stay a while."

Cernan called it "perhaps the brightest moment of my life... It's like you would want to freeze that moment and take it home with you. But you can't."

Decades later, Cernan tried to ensure he was not the last person to walk on the moon, testifying before Congress to push for a return. But as the years went by he realised he would not live to witness someone follow in his footsteps - still visible on the moon more than 40 years later.

"Neil (Armstrong, who died in 2012) and I aren't going to see those next young Americans who walk on the moon. And God help us if they're not Americans," Cernan testified before Congress in 2011. "When I leave this planet, I want to know where we are headed as a nation. That's my big goal."

On December 11 1972, Cernan guided the lander, named Challenger, into a lunar valley called Taurus-Littrow, with Harrison "Jack" Schmitt at his side. He recalled the silence after the lunar lander's engine shut down.

"That's where you experience the most quiet moment a human being can experience in his lifetime," Cernan said in 2007. "There's no vibration. There's no noise. The ground quit talking. Your partner is mesmerised. He can't say anything.

"The dust is gone. It's a realisation, a reality, all of a sudden you have just landed in another world on another body out there (somewhere in the) universe, and what you are seeing is being seen by human beings - human eyes - for the first time."

Three days earlier, Cernan, Schmitt and Ronald Evans had blasted off atop a Saturn rocket in the first manned night-time launch from Kennedy Space Centre. Evans remained behind as pilot of the command module that orbited the moon while the other two landed on the moon's surface. Cernan and Schmitt, a geologist, spent more than three days on the moon, including more than 22 hours outside the lander, and collected 249 pounds of lunar samples.

"In that whole three days, I don't think there's anything that became routine," Cernan recalled. "But if I had to focus on one thing... it was just to look back at the overwhelming and overpowering beauty of this Earth."

Completing their third moon walk on December 14, Schmitt returned to the lunar module and was followed by Cernan.

"We leave as we came and, God willing, as we shall return, with peace and hope for all mankind," Cernan said.

He later acknowledged that he had grasped for words to leave behind, knowing how the world remembered Neil Armstrong's "giant leap for mankind" on stepping on the moon in 1969.

Eugene A Cernan was born in 1934 in Chicago and graduated from Indiana's Purdue University in 1956 with a degree in electrical engineering.

He had been a Navy attack pilot and earned a master's degree in aeronautical engineering when Nasa selected him in October 1963 as one of 14 members of its third astronaut class.

Teresa was Cernan's only child with his wife Barbara. The couple married in 1961 and divorced 20 years later. In 1987, he married again, to Jan Nanna, and they lived in Houston.

In all, Cernan logged 566 hours and 15 minutes in space, more than 73 hours of them on the moon's surface.