Fifty years ago, Alexei Leonov opened the airlock of his tiny space capsule, which was orbiting the Earth, and stepped into the void. For 12 minutes the Soviet cosmonaut floated above our planet, tethered to his ship by a 16ft cable. In doing so, Leonov became the first person to walk in space.

It was an event of extraordinary importance – for spacewalks have since become a mainstay of most major manned endeavours in Earth orbit. More than 200 astronauts – floating free in space on extra-vehicular activity, or EVAs – have since carried out tasks ranging from the repair of the Hubble space telescope to the construction of the international space station. As Leonov told the Observer: “It is impossible to imagine the development of any serious space project or experiment without EVAs today.”

Spacewalks can be dangerous, however, and Leonov’s own mission very nearly ended in disaster after it was afflicted by a series of mishaps that will form the core of a new film, First Time, scheduled for release in Russia next year. It will tell a story that is every bit as dramatic as Apollo 13, the US lunar mission – filmed with Tom Hanks – that also came close to catastrophe.

Leonov – now 80 – is scheduled to give a first-person account of his spacewalk, and other aspects of his career as chief cosmonaut for the Soviet Union, when he speaks at the Science Museum in London this month.

Russian president Vladimir Putin and Russian cosmonaut Alexei Leonov, right, at an awarding ceremony in Moscow’s Kremlin. Photograph: Mikhail Klimentyev/AP

In 1965 the Soviet Union appeared to be well ahead of the US in the race to land the first humans on the Moon. It had put the first satellite, the first animal, the first man, and the first woman into orbit and, knowing that America was planning to allow one of its astronauts, Ed White, to take a spacewalk in June that year, it decided to add another first to its list of space achievements by getting a Soviet cosmonaut to do an EVA before then. Leonov, who had trained as a cosmonaut with Yuri Gagarin, the first man in space, was selected for the task. On 18 March he was blasted into orbit in a two-man Voskhod capsule which he shared with his commander, Pavel Belyayev. After completing one orbit, Leonov was given the go-ahead to begin his spacewalk and crawled into the craft’s makeshift airlock. He opened its hatch, slid out and floated into space to begin his mission. Leonov still remembers the utter silence he experienced when he emerged from his spaceship. “It was so quiet I could even hear my heart beat,” he told the Observer. “I was surrounded by stars and was floating without much control. I will never forget the moment. I also felt an incredible sense of responsibility. Of course, I did not know that I was about to experience the most difficult moments of my life – getting back into the capsule.”

Leonov’s spacewalk very nearly ended in disaster. In the vacuum of outer space, his spacesuit began to balloon out of shape and its fabric began to stiffen dangerously. His hands slipped out of his gloves, his feet came out of his boots, and Leonov could no longer get through his spaceship’s airlock. Even worse, the craft was hurtling towards Earth’s shadow. In five minutes, the cosmonaut realised he would be plunged into total darkness.

So he began bleeding air from his suit from a valve in its inner lining. Very slowly his suit deflated, just as Leonov began to notice the first signs of decompression sickness. “I could feel pins and needles in my hands and legs,” he recalled. Leonov squeezed himself headfirst through the airlock and just managed to close its hatch behind him, his temperature by now soaring through the extreme exertion of his return to the spaceship. Leonov slumped back in his seat beside Belyayev. His woes were far from over, however. First, a charge was fired to blast the airlock – which was no longer needed – into space. The explosion caused Voskhod 2 to rotate, disorienting its two crewmen. At the same time, instruments showed oxygen levels in the capsule were now climbing at an alarming rate, threatening to trigger a blaze that would have burned both men alive. Several hours passed before Leonov and Belyayev could get the craft’s oxygen levels back to normal.

By now, the spaceship was scheduled to return to Earth. However, the two cosmonauts discovered its automatic re-entry system no longer worked. So the pair fired the craft’s re-entry rockets manually. This manoeuvre should have separated the landing capsule, containing Leonov and Belyayev, from the spaceship’s orbital module. “A few seconds after the firing of the engine, we felt a jolt as the orbital module separated from our cabin – but something went wrong,” said Leonov. “We felt a tugging force pulling us back! I looked out of a window and saw the orbital module was still connected to us by a communications cable. As a result, both modules were spinning rapidly as we fell steeply to Earth!” Voskhod 2 was plunging to destruction, but was saved by the heat of re-entry which burnt through the communications cable. The landing module separated and its parachutes were deployed. “We were safe,” he said.

Cosmonaut Alexei Leonov in 1965 Photograph: Associated Press

The crewmen’s problems had still not reached an end. Their craft landed 2,000 kilometres downrange from its intended target and plunged into a dense Siberian forest. It took two days before a rescue mission reached the pair, who had to huddle in their tiny capsule in temperatures well below zero. “We spent two cold nights in the forest,” said Leonov. “We did not meet wolves or bears, but we knew that there were many of them around. It was spring time and the animals were very aggressive. Once again, we were lucky!” At the time, the Russians hailed the mission as a complete success. In fact, it had come close to ending in disaster, though these near-catastrophes were not revealed until many years after the return of Voskhod 2.

Belyayev died five years after the mission from peritonitis caused by an operation on a stomach ulcer. Leonov went on to become a distinguished cosmonaut. Indeed, had events unravelled in only slightly different ways, Leonov might have become the first Soviet cosmonaut to walk on the Moon.

In the 60s, the Soviet Union had started to design its own rival to the US Apollo lunar programme. “Our Lunar Orbital Craft (LOC) was going to carry two cosmonauts into orbit around the Moon,” said Leonov. “It would act as ‘a mother ship’ for a lander which would land me on the surface.” The rocket that would have taken the LOC and lander to the Moon was known as the N1, but had to be scrapped after several test flight failures. Leonov never made it to the Moon, but he did take part in one further notable space mission. He commanded the Soviet Soyuz capsule that docked with an Apollo capsule in space in 1975, a rendezvous that marked the end of the space race that had begun so well for the Russians in the late 50s but which ended so conclusively in US victory when Neil Armstrong and Buzz Aldrin stepped on to the Moon in July 1969. Later, Leonov – who is also a gifted artist – was appointed commander of the Soviet cosmonaut team and given the title chief cosmonaut. He retired in 1991.

Alexei Leonov will give a lecture, hosted by the British Interplanetary Society, at the Science Museum, London, at 7pm on 21 May. Tickets from the BIS .