On May 6, 1968, NASA astronaut Neil Armstrong almost met his fate while simulating a lunar landing. This was a little over a year before he would become the first person to walk on the moon.
Armstrong was flying in a machine called the Lunar Landing Research Vehicle at Ellington Air Force Base in Houston when some leaking propellant caused a total failure of the flight controls. After tumbling around in the air for a few seconds, it started to fall out of the sky.
Armstrong had to eject himself from the simulator when it was just 30 feet above the ground, and he safely parachuted down while his aircraft crashed and burned. If he had waited even just one second longer to hit the eject button, he would have been killed by the fiery explosion.
But Armstrong kept his cool the whole time, and he went right back to work in his office after the accident.
Source: https://www.space.com/39251-on-this-day-in-space.html