Neil Armstrong shut down the orbital thrusters and brought up the re-entry system, stabilising the craft. It turned out that one of the thrusters in the orbital system was stuck firing, possibly due to an electrical short. The mission was over, but they'd at least survived.
One of the reasons he was chosen as the commander of Apollo 11 was his ability to deal with situations like that. There was also the time when the LLTV training aircraft (the famous Flying Bedstead) went out of control and he had to eject - if he'd have done so a fraction of a second later he wouldn't have made it out alive. A couple of hours later he was back in his office doing paperwork, as if escaping death was all part of the day job.
Also the time in Korea when his F9F was hit by enemy fire and lost part of the wing in a collision with a powerline - Armstrong calmly flew the thing back to friendly South Korea before ejecting.