On a misty battlefield, soldiers flee a bombing run. When the dust settles, one of the soldiers notices a small figure running in the mist. The soldier's companion warns him they need to leave, because clam drones are going to pass through the area to pick off those whom the bombing run missed.
The soldier says he thinks he saw a child and will catch up; he runs off and discovers a boy, whom he tells to stop. The boy, dressed in the same uniform as the soldier, turns fearfully as he is asked if he is lost. The boy nods and the earth below him rumbles; something appears to be tunneling underneath it. The soldier warns the boy to be still and quiet, and takes out a scanner. The soldier and the boy are standing on a Handmine field; they will be safe as long as they remain still and quiet.
The soldier pulls out some tools and tries to keep the child calm; he asks if the boy has ever seen a Handmine before. The boy nods and points to the man's leg — a muddy hand has clamped onto the soldier's ankle. The soldier looks upon his ankle in fear and then back to the boy, before the Handmine pulls him down into the earth, creating a gaping hole that closes behind him.
Several muddy hands with a single eye on their palms rise from the ground. Alone and panicked, the boy begins to scream for someone to help him. Suddenly, something lands beside him: a sonic screwdriver. The boy picks it up, and sees a man through the mist. The Doctor has arrived to help the child. Using the sonic screwdriver to create an audio corridor, they talk. The Doctor tells the boy that he has one chance in a thousand of surviving, but that he should focus on that one chance: one is all he needs. He asks the boy what war this is, not knowing when or where he is. The boy, confused, replies that "it's just the war." He is similarly confused when the Doctor asks him what planet this is. The Doctor tells him not to mind. In an attempt to reassure and comfort the boy, the Doctor asks him what his name is. The boy replies, "Davros. My name is Davros."
At the Maldovarium, Colony Sarff, an envoy of Davros, is searching for the Doctor. He demand that the patrons tell him his location. He is met with silence. In the Shadow Proclamation, the Shadow Architect refuses to tell Sarff where the Doctor is, insisting that she has no idea. On Karn, Ohila warns Sarff of the dangers hunting the Doctor can bring. Colony Sarff tells Ohila that Davros is dying, but is still anticipating his final meeting with the Doctor. They then leave, giving Ohila a message for the Doctor, unaware that the Time Lord is hiding from behind the rocks.
On present day Earth, Clara is teaching in Coal Hill School. She looks out the window, noticing something amiss; using a marker, she draws a circle around a plane in the sky, realizing that it's frozen in the air. After assigning her class to use their mobiles to search about any information, Clara is told by another teacher about a call for her. Knowing it's UNIT, Clara leaves for the Tower of London. She attempts to contact the Doctor, but receives no answer.
At UNIT HQ, Kate Stewart is tracking the frozen planes. Clara deduces that the planes aren't being weaponized because an invasion involves stealth, not spectacle. At that moment, the Doctor's communication channel is opened, and lyrics appear on the screen, with one repeating word — Missy. Missy appears on-screen, explaining that the frozen planes were just a way to get their attention. She proposes a meeting with UNIT.
At 16:00, Clara and Missy meet in a cafe, where Missy demonstrates her ability to freeze the planes with a simple Time Lord trick and shows Clara the Doctor's confession dial — containing the Doctor's last will and testament. She explains that a confession dial is given to a dying Time Lord's closest friend on their final day. The Doctor's confession dial has been given to Missy, but will only open once he's dead. The Doctor is facing his final day, Missy tells Clara, and they therefore both assume that he has come to Earth. They don't know where or when, however. Clara asks Missy how a Time Lord would spend his final day, and Missy says that it is supposed to be in meditation. Clara tells Kate to track mentions of the Doctor that don't also mention an alien disturbance, and they discover his location: Essex, the Middle Ages. Using a vortex manipulator, Missy and Clara vanish into the past.
Clara and Missy arrive in a castle and discover the Doctor playing guitar atop a tank for a crowd of peasants. They believe that he is a magician, and his apprentice is Bors. The Doctor defends his actions to Missy and Clara, saying that his last party is going how he wants, which includes being able to play with time. Sarff arrives, revealing his composition: a colony of snakes, bound together to form a humanoid. They demand the Doctor come with them to speak with Davros. The Doctor, recalling an action about which he feels great shame, agrees to go with Sarff. Missy and Clara demand to be taken as well; after voting, Sarff agrees to take them, binding the hands of all three with snakes. The Doctor, Clara and Missy are teleported to Sarff's shuttle. In their absence, Bors — revealed to have been converted into a Dalek puppet by Sarff — procures the TARDIS and informs Dalek High Command.
Travelling to Davros' location — apparently a space hospital - the Doctor tells Clara who Davros is — the creator of the Daleks; a child of war who sealed his species inside tanks to preserve them. In the hospital, the Doctor goes with Sarff to see Davros, leaving Clara with Missy. As he leaves, he mentions the gravity. Both the Doctor and Missy have noticed that the gravity is natural. The hospital cannot be a space station. Missy daringly opens the air lock.
The Doctor meets with Davros, and they talk of how their conflicts have been fuelled by a single disagreement — was Davros right to create the Daleks, or was his lack of compassion wrong? Davros plays several recordings of the Doctor's various speeches to him about morality. He ends on the Doctor's reasoning against destroying the Daleks: it would not be right to kill a child who would cause nothing but evil once grown, given he is still innocent; recalling, in a cruel twist of fate, the Doctor seeing Davros as a child. The Doctor tells him that his point has been made.
Clara and Missy walk out, apparently into outer space. However, they are breathing, and apparently walking on solid ground. Missy realizes that, once within the planets atmosphere, one begins to synchronize with it. The illusion vanishes, showing a city in the middle of a wasteland; Missy reacts with horror and disbelief, while Clara is left confused. At the same time, the Doctor is shown the truth by Davros; they are on Skaro, the Daleks' home world.
Sighted by a Dalek, Clara and Missy are taken to see the Supreme Dalek, who has a large weapon aimed at the TARDIS. Missy attempts to reason with the Daleks - if they don't destroy the TARDIS, she can help them fly it, allowing them to conquer the universe. However, the Supreme Dalek demands Missy's total exterminated, and she vanishes in the blast.
The Doctor pleads with Davros to not let Clara come to harm — but Davros tells him that he does not control the Daleks. Davros observes the Daleks' choice to wait for Clara to run. As she runs, they exterminate her, causing her to vanish. The Supreme Dalek then orders the TARDIS to be destroyed and it is seemingly vaporised by the weapon aimed at it. Davros reasons with the Doctor that this happened because the Doctor showed him compassion as a child, despite knowing his destiny — allowing Davros to create the Daleks, who have now killed his friends.
The child Davros, still pleading with the Doctor not to leave, hears the TARDIS rematerialise behind him, and disbelievingly asks him how he has moved. The Doctor explains he's come from the future, and that he has to save his friend in the only way he can. Brandishing a severed Dalek gunstick, the Doctor glares towards the child, shouting "Exterminate!"