Cernan was with his relatives when he died at a Houston hospital following ongoing heath issues, family spokeswoman Melissa Wren told The Associated Press. His family said his devotion to lunar exploration never waned.
"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," his family said in a statement released by NASA.
Cernan was commander of NASA's Apollo 17 mission and on his third space flight when he set foot on the lunar surface. On Dec. 14, 1972, he became the last of only a dozen men to walk on the moon - and he traced his only child's initials in the dust before climbing the ladder of the lunar module the last time. It was a moment that forever defined him in both the public eye and his own.
"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 wasn't the last person to walk on the moon, testifying before Congress to push for a return. But as the years went by he realized he wouldn't 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."
Cernan died less than six weeks after another American space hero, John Glenn, the first American to orbit the Earth in 1962. Their flights weren't the first or last of the Mercury and Apollo eras. Yet to the public they were the bookends of America's space age glory.
On Dec. 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 mesmerized. He can't say anything.
"The dust is gone. It's a realization, 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 nighttime launch from Kennedy Space Center. 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."
"To go a quarter of a million miles away into space and have to take time out to sleep and rest ... I wished I could have stayed awake for 75 hours straight. I knew when I left I'd never have a chance to come back."
Completing their third moon walk on Dec. 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.
Before heading home, Cernan said he drew the letters "TDC" - the initials of his then 9-year-old daughter, Teresa Dawn - with his finger on the dusty gray lunar surface. He said he imagined someone in the distant future would find "our lunar rover and our footprints and those initials and say, 'I wonder who was here? Some ancient civilization was here back in the 20th century, and look at the funny marks they made.'"
Eugene A. Cernan was born in 1934 in Chicago and graduated from Indiana's Purdue University in 1956 with a degree in electrical engineering. (Armstrong also was a Purdue grad.)
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.
Cernan had the looks of an astronaut from central casting. "He's your classic sort of handsome debonair flyboy," said space historian Roger Launius, associate director of the Smithsonian Air and Space Museum.
In 1966, he was pilot of Gemini 9, a three-day flight with command pilot Tom Stafford where they used different techniques to rendezvous with a docking adapter that was previously launched. On the flight, Cernan became the second American to walk in space, spending more than two hours outside the Gemini spacecraft.
Cernan would later call the mission, "that spacewalk from hell."
"It was very serious," said Launius, the historian. "He lost all kinds of water, his equipment did not work effectively. He overheated. His visor glossed over with water, he could barely see. He barely got back in the spacecraft."
Cernan's sweat so much he lost 13 pounds. The space agency was forced to go back to the drawing board.
"That was a really important learning experience," Launius said. "The difficult thing about that is they put an astronaut's life at great risk there. They learned the lesson."
With the Apollo program underway, Cernan flew on Apollo 10 in May 1969. It was a dress rehearsal for the lunar landing on the next flight and took Cernan and Stafford, aboard the lunar module Snoopy, to within 9 miles of the moon's surface.
The mission was marked by a glitch when the wrong guidance system was turned on and the lunar module went out of control before Stafford righted it by taking manual control.
Cernan often joked that his job was to paint a white line to the moon that Armstrong and the rest of the Apollo 11 crew could follow. Yet Cernan was one of only three people to voyage twice to the moon - either to its surface or in moon orbit. James Lovell and John Young are the others.
In 1973, Cernan became special assistant to the program manager of the Apollo program at Johnson Space Center in Houston, assisting in planning and development of the U.S.-Soviet Apollo-Soyuz mission. He was senior U.S. negotiator with the Soviets on the test project.
He retired from NASA three years later. He worked for a Houston energy firm, Coral Petroleum, then in 1981 began his own aerospace consulting company. He eventually became chairman of an engineering firm that worked on NASA projects. He also worked as a network television analyst during shuttle flights in the 1980s.
A documentary about his life, "The Last Man on the Moon," was released in 2016.
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.
"I can always walk on Main Street again, but I can never return to my Valley of Taurus-Littrow, and that cold fact has left me with a yearning restlessness," he wrote in his 1999 autobiography, also entitled "The Last Man on the Moon."
"It was perhaps the brightest moment of my life, and I can't go back," he said. "Enriched by a singular event that is larger than life, I no longer have the luxury of being ordinary."
Cernan is survived by his wife, Jan Nanna Cernan, his daughter and son-in-law, Tracy Cernan Woolie and Marion Woolie, step-daughters Kelly Nanna Taff and husband, Michael, and Danielle Nanna Ellis and nine grandchildren.
Borenstein reported from Washington. Associated Press writer David Warren contributed from Dallas.