The TARDIS makes a bumpy landing on the Moon in the year 2070 and, dressed in spacesuits, the Second Doctor and his companions Jamie, Polly and Ben venture outside and enjoy the low gravity environment. Jamie is injured while they fool around.
The only building on that part of the moon’s surface is the Moonbase, a weather tracking and managing station which is staffed by an international crew managed by the bullish Hobson. They are using the gravity machine the Gravitron to control the Earth’s weather. When the time travellers arrive, the Doctor ingratiates them in the usual manner and is on hand to do some detective work because some of the crew have been collapsing in comas with a strange virus that spreads throughout the body. International Space Control responds to the crisis by quarantining the Moonbase – a precaution made more valid after one of the patients in the sickbay dies of the mysterious virus.
Something is definitely amiss because another of the Moonbase crew has disappeared in the food stores, and the radio operator has also noticed the Moonbase radio transmissions are being monitored from somewhere else on the moon. Jamie has been placed in the sickbay where, feverish and delirious, he begins mumbling about a “Phantom Piper” he claims to have seen. The figure is a Cyberman and Polly recognises it and is able to tell the Doctor their old enemies are stalking the Moonbase. The Cyberman seems to have taken the bodies of dead crewmen, and all of them have now vanished.
While Hobson deals with the Gravitron, which is becoming difficult to control with fewer staff, the Doctor decides to focus on the cause of the viral disease. He eventually works out the neurotropic virus has been spread through infected sugar from the food stores – and is thus an organised scheme to destabilise the crew. The Cybermen within the Moonbase now emerge from hiding and use their weapons to take control of the central control centre of the Moonbase. The Cybermen want to use the Gravitron to destroy all life on Earth by altering the weather. They have reconditioned the three missing crewmembers, none of whom were really dead, and turned them into zombie-like slaves, and they are sent into the heart of the Gravitron to subvert the machine.
Using fire extinguishers, nail varnish remover and other objects that attack plastic, Ben, Polly and a recovered Jamie lead a fightback from their incarceration in the medical wing. The Cybermen in the initial attack force are dealt with – but this only prompts a bigger squad of Cybermen to attack. They advance on the Moonbase through the vacuum of the Moon’s surface. The cybermen then destroy a relief craft dispatched to help the Moonbase crew and also use radio controlled beams to reactivate their zombies inside the base. The Cybermen then erect a large cannon and threaten to blow the base open unless the humans stop their resistance. In response the Doctor ensures the Gravitron is pointed at the surface of the moon and uses its intense powers to blast the Cybermen army into space. As Hobson and his team reorientate the Gravitron to its proper use, the Doctor and his companions slip away. Back in the TARDIS they dematerialise, and then activate the scanner to reveal a monstrous claw waving around...