Alan Bean, who became the fourth man to walk on the moon and turned to painting years later to tell the story of NASA’s Apollo missions as they began receding into history, died on Saturday at Houston Methodist Hospital. He was 86.

His death was announced by his family in a statement released by NASA.

Mr. Bean stepped onto the lunar surface preceded by Pete Conrad, the mission commander of their Apollo 12 flight, in November 1969, four months after Neil Armstrong and Buzz Aldrin became the first lunar explorers.

The flight of Apollo 12, while thrilling in its own right, was not nearly as dramatic as the pioneering mission of Apollo 11, but it resulted in a more extensive exploration of the moon.

Mr. Bean returned to space in July 1973, when he commanded a three-man flight to the orbiting space research station Skylab, the forerunner of the International Space Station. The astronauts on that mission spent 59 days in space, a record at the time.