While returning to 20th-century Earth, the TARDIS passes through its own temporal wake from a journey it will make in the future, and materialises in the Tsiolkovskii crater on the dark side of Earth’s Moon. A time safe in the console room then opens, revealing an object which the Doctor will place inside it at some point in the future -- a diary purporting to describe Captain Richard Haliwell’s expedition to the Moon in the year 1878. Turlough is skeptical, but the Doctor knows that the risk of a time paradox proves this diary to be important; it could be that the Doctor’s actions will determine whether a new timeline comes into existence, displacing all of history as they know it. It is possible for the Victorians to have built airtight hulls and air recycling systems, and according to Haliwell’s diary, the last obstacle was overcome by Professor Bryce-Dennison’s invention of the impeller drive -- a propulsion system so advanced that even the Professor has trouble explaining how it works.
Three young, unmarried captains are chosen to lead the expedition to the Moon; Haliwell is in command of the Cygnus, while Sinclair commands the Lynx and Green the Draco. Bryce-Dennison and his 21-year-old daughter and assistant Emily will accompany Haliwell, despite his reservations at having a woman aboard his ship and their disagreement on the matter of female equality. The three ships launch from a secret base on Glen Marg and reach the Moon within a day, but to their surprise, on the dark side of the Moon they find a bubble of atmosphere containing vegetation and an artificial construction. The ships land in the bubble, where Haliwell leads an exploratory expedition into the jungle. However, the perils are like nothing on Earth, and soon after Davis is nearly eaten by a carnivorous plant, Sub-Lieutenant Granby is snatched away from the others by something moving too quickly to be seen. As the sailors search for Granby, they instead meet two human strangers -- who introduce themselves as the Doctor and Turlough...
The Doctor immediately stops reading, warning Turlough that advance knowledge of their own future will rob them of free will and set up the risk of a paradox if they fail to act as, in the future, they already have. Turlough is skeptical until he finds a note in the diary, confirming the Doctor’s warning, and written in his own handwriting. The Doctor concedes that they should take Kamelion along, but Kamelion finds that the energy fields which keep the atmosphere bubble intact interfere with his functioning, and is therefore forced to remain behind. The Doctor and Turlough set off alone and soon meet the expedition, and despite the sailors’ suspicions, the Doctor assure them that he will not dispute their prior claim to the Moon; he is simply here to help. Unfortunately, Granby is beyond help; his body is found in a nearby clearing, his brains removed through a hole punched in his head. A pack of animals like a cross between giant spiders and jellyfish then descends upon the expedition, pursuing them back through the jungle. The sound of gunfire attracts reinforcements who help the sailors dispose of the animals, but the Doctor is puzzled by the predators’ unnatural behaviour; they kept pursuing the expedition long after the benefit of consuming them was outweighed by the energy expended to catch them.
On their way back to the landing site, the expedition stumbles across what appears to be a long-abandoned vacuum gun, made of low-tech materials and intended to fire projectiles out of the crater. Setting aside the mystery for another time, they return to the ships, just as a miniature flying saucer arrives from the alien citadel to investigate the new arrivals. The saucer scans the ships and landing party, and then plucks up Emily and Captain Haliwell and carries them back to the saucer before the sailors can stop it. The shock of his daughter’s kidnapping combined with his recent exertions kills Bryce-Dennison with a massive heart attack. Sinclair orders the Draco to pursue the saucer, but a plasma cannon mounted on the citadel opens fire and shoots the Draco down in the jungle. The Doctor offers to use his own ship to rescue Emily and Haliwell, but when he and Turlough return to the TARDIS they find that the inhabitants of the citadel have increased power to the atmospheric shield to prevent the British from escaping -- and that a side-effect of the shield’s power is preventing the TARDIS from dematerialising. They must return to the British, and prepare to make their way through thirty miles of hostile lunar forest on foot. Without telling the Doctor, Turlough takes Haliwell’s diary with him, to ensure that he has advance warning of any dangers to come.
Despite the damage to its impeller coils, the Draco lands safely, thanks largely to the skillful piloting of helmsman Henry Stanton. However, Captain Green doesn’t seem to understand just how valuable Stanton is to the expedition, and soon demonstrates his incompetence by ordering both helmsmen to accompany a rescue expedition to the citadel while a skeleton crew remains behind to repair the Draco. The journey is just as dangerous as Stanton had feared, and when his fellow helmsman is killed by a swarm of venomous insects, Stanton insists that he be allowed to return. Green is about to place him under arrest for cowardice and mutiny, when the party is attacked a behemoth larger than anything they have yet encountered. While fleeing from the behemoth, Green falls badly and breaks his leg, and as the behemoth approaches, Stanton inadvertently smothers Green while desperately trying to silence his cries for help. He is then forced to make his way back to the Draco alone, a dangerous journey which pushes him completely over the edge. Predators have attacked the Draco as well, and some even managed to get aboard before they were killed; nevertheless, Stanton shoots the commanding officer and orders the engineers to repair the damaged coils -- or he will take off with the functioning ones, after throwing out their bodies to lighten the load.
As Sinclair’s party makes their way towards the citadel, they encounter a beautiful alien female trapped on a cliff. Turlough rescues her, but is unable to communicate until she touches his temples for a moment, after which she speaks perfect English. Realising that they will need help in the dangerous forest, Sinclair allows Lytalia to lead his men to her settlement, where the Phiadoran Princess Nareena and her ladies-in-waiting have been exiled following a coup on their homeworld. This is a dangerous and illegal safari park, placed on the dead satellite of a primitive world to avoid detection; when Nareena and her retinue were exiled here it was assumed that they wouldn’t last long, but they have survived for three decades even though visitors stopped coming to the park some time ago. The warden’s citadel is protected by energy shields attuned to the Phiadorans’ body cells, but humans may be able to penetrate these barriers and shut down the warden’s mechanical servants. The Phiadorans offer to guide the British through the forest in exchange for sanctuary on Earth, and Simmons is only too happy to agree. As they plan their assault, Turlough heads off, claiming he needs to rest -- but in fact he intends to read more of the diary, to prepare for the coming assault.
In the citadel, mechanical servants escort Haliwell and Emily to an audience with the alien warden. Despite Emily’s best efforts she is unable to communicate with the alien creature, which places them in a shared cell -- much to Haliwell’s discomfort. Nevertheless, he and Emily agree that they must not let their personal differences excacerbate an already dangerous situation, and also agree to call each other by their first names. Over the next two days they are put through a series of tests to gauge their strength, stamina, endurance and speed, as if they were simple laboratory animals. As the ordeal progresses, Richard comes to appreciate Emily’s intelligence and strength of character, just as she comes to understand that his compliments are not meant to be patronising. When they are placed in an arena with a choice of weapons and forced to defend themselves against a variety of monstrous alien animals, they work together, using skill and intelligence to defeat their attackers. However, despite their best efforts, Emily is badly injured by their final opponent. She and Richard are allowed to return to their cell to rest, and a healing ointment is provided for Emily’s wounds; but she remains stiff and sore, and does not believe she will survive a second bout in the arena...
Sinclair’s sailors and even Turlough find it easy to relax around the friendly and cheerful Phiadorans, all of whom appear much younger than their actual calendar age. The Phiadorans point out many dangers which would otherwise have caused the British a great deal of trouble, and the only death occurs when a British sailor stumbles into a pod of mushrooms which sweat natural nitroglycerin. However, the Doctor turns the tragedy to their advantage by coming up with a plan to break into the citadel using the deadly fungus. After two days’ march, the party reaches the citadel, where Turlough reads more of the diary to prepare himself -- and accidentally finds mention of his own name. Now he will be forced to act just as the diary has said he will, or else people will die.
Richard and Emily are forced back into the arena, where they are pitted against an intelligent hunter. Emily provides a distraction while Richard tracks and kills their opponent -- which turns out to be mechanical as well. As another, larger killer enters the arena, Richard finally deduces the purpose of the tests; they are being assessed as suitable targets for the hunters in the safari park. Meanwhile, the sailors catapult their explosive fungus at the citadel until two saucer probes arrive to investigate, and the Phiadorans capture them, enabling the Doctor to deactivate the remote controls and rewire them so the British can fly them manually. Turlough leads the flight to what appears to be a greenhouse dome, where, just as he has read in the diary, he crashes through the glass dome and crushes the robot hunter, saving Richard and Emily’s lives. The sailors then fight their way to the warden, and the TARDIS’ influence enables the Doctor to speak with it. The warden is as much a prisoner as the others, having been genetically and mentally conditioned to keep the park running properly. It is unable to disobey orders directly, but it is weary of its long servitude, and therefore shows the Doctor which computer banks control the robots. The British sailors destroy them, and as the robots shut down, the warden allows itself to die as well, its task finally complete.
The Doctor releases the energy fields, enabling the British to depart, but notices that the warden’s death has triggered an automatic shut-down procedure. The park has been programmed to self-destruct, leaving no trace of its existence, and the atmospheric shields are already decaying. The sailors retreat on the saucers, taking the Phiadorans with them -- but the citadel’s plasma cannon begins firing on an automatic setting, and the Doctor, Turlough and Lytalia are shot down near the Draco. The presence of bodies with bullet wounds indicate what has happened here, but as the crater’s atmosphere is already beginning to dissipate into space, they have no choice but to contact the mutineers and board the ship. Stanton orders the Doctor and Turlough to help repair the damaged impeller coils, and they have no choice but to obey, although they are under no illusion that they will be allowed to live should they succeed. In fact, Stanton intends to pilot the ship to another country where his skill will be appreciated. Once his work is complete, the Doctor shuts off the ship’s lights, hoping to use the element of surprise to retake the bridge -- but some of the alien blood splattered about the ship during the earlier battles turns out to be bioluminescent, and the mutineers recover from the shock more quickly than the Doctor had hoped. Only Turlough manages to escape, and remains helpless to intervene as the mutineers throw the Doctor and the engineers out of the airlock.
Before the mutineers can dispose of Turlough, the ship unexpectedly takes off, and they reach the bridge to find that the navigator’s brains have been sucked out through a hole in his skull. Lytalia, cowering in the corner, tells them that there is a Vrall hidden aboard the ship; a ruthless and cunning killer which must have slipped aboard during the earlier battles. Turlough and the mutineers make an uneasy truce and set off after the Vrall, while Lytalia, exhausted by her recent exertions, remains on the bridge. The Vrall, however, is more dangerous than they had anticipated, and another mutineer is killed before the others can barricade themselves in the engine room. Turlough suggests hunting the Vrall with the acid jars from the impeller drive’s batteries, but when he and Stanton emerge from the engine room, the Vrall overpowers them and kills the others -- and then squeezes back into the hollow husk of Lytalia’s body, where it had been hiding all along. Having disposed of its enemies, it orders Stanton to pilot it back to the Moon, where Turlough will use the TARDIS he described to pilot it anywhere it wishes to go in time and space. Stanton, however, escapes and flees to the cargo hold -- and when the Vrall pursues him, he deliberately opens the hatch. He and the Vrall are expelled into space, along with all of the air in the ship...
The Doctor’s Gallifreyan metabolism enables him to survive the cold and airlessness of the lunar crater long enough for him to find a spacesuit which the mutineers had abandoned to lighten their ship’s load. Even so, he nearly dies before reaching the TARDIS, but fortunately the shutdown of the force fields has put an end to the interference which kept Kamelion from emerging. Kamelion carries the delirious Doctor back to the TARDIS, where the Doctor’s wandering mind puts together the clues he has witnessed and he realises the truth. He and Kamelion rescue Turlough from the airless Draco just in time, but when Turlough tells the Doctor his story, the Doctor is forced to inform him that the so-called Phiadorans were Vrall all along. The TARDIS should have translated Lytalia’s language for them when they first met, just as it did for the warden -- and if the Phiadorans really acquired their knowledge of English from Turlough then they should have spoken in a 20th-century vernacular, instead of referring to the warden’s robots as “mechanical servants”. Lytalia in fact acquired her knowledge of the English language by eating Granby’s brains, and passed it on to the rest of her people via encoded neurochemical packets. The Vrall must have used the vacuum gun the expedition found earlier to fire RNA spores encoded with the instructions for the impeller drive into space, hoping that they would reach a receptive mind on Earth and inspire an expedition to the Moon. The British were lured to the Moon deliberately, and are now taking the Vrall to a new feeding ground...
Richard has been forced to take off without the Doctor once he is certain that nothing can survive in the airless crater. On his way back to Earth he sends word of their guests via heliograph, and before landing he proposes to Emily, who promises to consider his proposal if he honestly accepts her and her gender as true equals. The two surviving ships land back at Glen Marg, where Queen Victoria herself is waiting to greet her distinguished visitors... but upon emerging from the ships, the Vrall shed their outer skins and fall upon the horrified officers. The queen is saved by the quick reactions of her attendant John Brown, and she and the surviving officers barricade themselves in the mess hall as the Vrall feast outside. By the time the TARDIS arrives, the Vrall have begun to reproduce by cellular division, and it is clear that there is no hope of containing them. The Doctor therefore returns to the citadel on the Moon to collect the weapons which the hunters would have used against the Vrall, and he finds what he needs and escapes moments before the citadel finally self-destructs, leaving only an unusually deep crater. The Doctor, Turlough and Kamelion then return to Earth, and use their weapons to kill the Vrall before they can break into the mess hall.
In the aftermath of the Vrall attack, the Doctor decides that the Victorians are not yet ready for space travel. He therefore has Kamelion impersonate the Queen’s dead husband Albert, and appear to her as a vision just long enough to tell her that humanity is not ready for space travel. The Queen therefore orders the ships to be destroyed, and all record of this horror erased from history. As the Doctor and Turlough depart, Richard gives the Doctor his diary so that some record of the adventure will survive, and Turlough learns that Emily has accepted Richard’s proposal. Back in the TARDIS, the Doctor checks the data banks and learns that the Phiadorans were in fact rulers of a ruthless matriarchal dictatorship, and maintained control of their subjects through genetically modified pheromonal glands which subverted the will of humanoid males. Their empire collapsed soon after their overthrow, which explains the lack of visitors to the safari park. Turlough, having learned his lesson, puts “his” copy of Haliwell’s diary in the TARDIS library, and writes a note to himself which the Doctor places in the “younger” version. The Doctor then puts the “younger” version of the diary in the time safe, tying up the last temporal loose end.