Amy and Rory drive through a field in Leadworth, following obscure directions. They finally arrive at their destination and find the TARDIS in the middle of a crop circle. The Doctor is there and shows them a newspaper headline about the crop circle, and points out that he’s standing in the “O” of a huge “Doctor” they cut into the field. Rory points out that the Doctor never answers his phone and Amy asks if he’s found their daughter. The Doctor hugs Amy and reminds her that she knows who Melody will grow up to be, so they know he’ll find her.
Meanwhile, Rory reads the newspaper article and discovers that there’s a slash through the word “Doctor.” They look up and see a car heading for them. It brakes to a stop inches from the TARDIS and a woman named Mels emerges. She explains that she followed Amy and Rory there and knows about the TARDIS, and tells the Doctor that she’s Rory and Amy’s best friend. As the police close in on Mels, she draws a gun on the Doctor and says that she needs to leave now. When the Doctor asks where she wants to go, Mels suggests that the go kill Hitler.
Years ago in Leadworth, Mels plays with Amy and Rory, and Amy tells her about the Doctor, the “Raggedy Man.” Mels gets in trouble with school, primarily for talking about how the teachers don’t know about the Doctor and his effect on history. She soon runs afoul of the law, much to Amy’s disgust. Mels points out that Amy has Rory but she doesn’t have anyone, even though they insist that they’re not together. Amy has always assumed that Rory was gay, pointing out that he’s never paid attention to any girls. Rory storms out as Amy finally figures out his feelings for her.
In the present the TARDIS runs out of control and Mels inadvertently shoots the console, assuming guns don’t work in the console room.
In Berlin, 1938, a German officer, Zimmerman, enters the Chancellery Building. He’s unaware that a janitor is actually a mechanical replacement, transmitting images to a Justice team lead by Carter, Anita, Jim, and Harriet. They analyze the data and begin creating a duplicate. They send the janitor into the officer’s room and it begins to duplicate Zimmerman. Harriet goes to an upper level but her authorization bracelet briefly fails. A creature prepares to eliminate her until she gets her bracelet working again. Harriet goes to the upper levels and looks out of the janitor’s eye as it continues to duplicate Zimmerman. It then takes Zimmerman’s officer’s glasses and dons them, and then fires a beam that miniaturizes the officer and teleports him inside the Justice drone-ship. Anita confirms that Zimmerman is guilty of hate crimes and Carter tells her to leave Zimmerman to the antibodies. Robotic floating drones quickly eliminate Zimmerman.
“Zimmerman” comes to see Hitler and tells him that he’s been found guilty. It prepares to kill Hitler, but Jim confirms that they’re too early in Hitler’s timestream. Anita picks up an incoming and they look to the window, where the TARDIS comes crashing through. The Doctor and the others emerge as the TARDIS fills with toxic fumes. Rory finds the seemingly unconscious “Zimmerman” but soon confirms that he is undamaged. Meanwhile, the Doctor comes face-to-face with Hitler, who thanks him for saving his life. He examines the TARDIS, intrigued, and the Doctor tells him that it’s from England and the British are coming.
The Zimmerman unit gets up and Hitler shoots at it until Rory punches him, grabs the gun, and tells him to sit still. Amy goes to help “Zimmerman,” which speaks thanks to Carter providing the words. The Doctor has Rory put Hitler in a cupboard and examines “Zimmerman,” and Carter orders the crew to have it faint. It does and the Doctor points out that it’s a perfect faint. Amy checks on Mels, who was hit by one of Hitler’s shots.
Aboard the Zimmerman drone, Jim identifies the TARDIS and informs Carter that they have located the greatest war criminal of all time: a woman.
The Doctor tells Mels to hold on, and she tells him that she used to dream about him based on the stories that Amy had told her. She suggests that the Doctor marry him and he plays along, asking if he should meet her parents. Mels tells him that both of her parents are right there and then starts to glow with regenerative energy. They move back while the Doctor explains that Mels is short for Melody, and that Melody as a teen came back to be with them. Melody regenerates, transforming into River Song. She checks herself in the mirror, throws herself at the Doctor and kisses him briefly, and goes to weigh herself, while the others try to take in the new revelation. The Doctor warns them that River knows nothing about her future, their past, and doesn’t even know her name.
Aboard the Justice drone, Carter confirms that it’s Melody Pond, the woman who kills the Doctor.
River draws a gun on the Doctor and prepares to shoot. The Doctor noticed that she picked up the gun earlier, and that he took the bullets out before she did. When River tries to kill him, the Doctor reveals that he anticipated her every attempt and aborted them when she wasn’t looking. Amy wonders why River is now a psychopath and River explains that she was trained and conditioned to kill by the people who took her at Demon’s Run. She goes to the shattered window and the Doctor tries to stop her, but he clutches at his chest in pain. River points out that he understands every form of warfare except one, and the Doctor realizes that she poisoned him with her earlier kiss. She jumps out while Carter and his people scan the Doctor and confirm he’s dying, even though that should be impossible.
The Doctor gives his sonic screwdriver to Amy and tells Rory to go after River. He goes to the window and sees River greet a squad of armed German soldiers. Meanwhile, the Doctor staggers to the TARDIS and tells Amy to go with Rory, and then staggers inside. He activates the exhaust fans to remove the toxic gasses.
The German officer orders his men to shoot River. Rory climbs down and watches from hiding as they open fire without effect. River points out that she is still regenerating and releases a blast of energy, stunning them. She takes all of their guns and grabs a motorcycle as Amy arrives and joins her husband. They run up and River tells them that she’s going shopping as she drives off. A German courier rides up, and Rory knocks him out and goes after River with Amy. Once they leave, the “courier” gets back up and Carter orders the Justice drone to pursue. As they follow, Jim confirms that the Doctor can’t die now because he’s due to die April 22, 2011, in Utah. It’s a fixed point and he must always die at that particular point, but Carter points out that he’s dying right now.
In the TARDIS, the Doctor activates the voice interface and he tries to find a holographic image of someone he hasn’t screwed up. The TARDIS finally chooses Amelia, before he got it wrong. It informs him that he has been poisoned with Judas tree sap and will be dead in 32 minutes. The poison has disabled his regenerative ability and there is no cure. The Doctor insists that River needs him and he can’t die and tells Amelia that it needs to tell him how he can leave. “Amelia” insists that she’s a voice interface, but then says “fish fingers in custard.” Realizing what she means, the Doctor crawls to the console, activates it, and screams “custard!”
River storms into a restaurant, complains that she has nothing to wear, and tells the customers to take off their clothes. Rory and Amy are driving outside and see women in their lingerie running out of the restaurant. As they take in the scene, the Justice drone arrives, disguised as Amy. Inside, River tries on her new clothing and the Amy drone comes in.
Aboard the Justice drone, Rory and Amy find themselves on a catwalk. Antibody drones surround them and prepare to eliminate them, but Jim arrives and gives them authorization bracelets just in time. He explains that they’re in a Justice Department vehicle and welcomes them onboard.
The Amy-drone accuses River of killing the Doctor on the orders of the Silence Movement. It confirms that River is aware of her guilt and then fires a beam of energy. However, the TARDIS appears and the Doctor steps out, wearing a tuxedo and pointing out that he’s not dead. Inside the drone, Amy and Rory arrive in the command center as Carter tries to figure out how the Doctor can still be alive. Meanwhile, the Doctor uses his sonic cane to scan the Justice vehicle and confirm that there’s a miniaturized crew inside.
Amy uses the sonic screwdriver to signal that they’re okay, and the Doctor collapses from the poison. He tries to pass it off as his leg falling asleep, and River tries to run. The Justice drone blasts her again, trapping her in an energy field, but the Doctor tells them not to hurt her. When Carter asks why, saying that River killed the Doctor, the Doctor asks what it has to do with the Justice Department. The commander explains that many criminals have gone unpunished in their lifetimes, so the Justice Department extracts them from their timelines near the ends of their lives and give them hell.
The Doctor asks to see the biography of him they have on file, but Carter refuses until Amy insists and notes that River is her daughter. Jim points out that family has privileges and Carter turns over the files. The Doctor confirms that the Silence wants him dead, and the files reveal that the Silence is a religious orders. They believe that when the First Question is asked, silence will fall. The First Question is the oldest question, hidden in plain sight. However, it is not known.
The Doctor collapses in pain and Carter assumes that he’s finished. As he orders River’s torture, the Doctor asks to talk to Amy. He tells her to stop them and save her daughter, and Amy remembers the identification bracelets. She uses the sonic screwdriver to short out her bracelet. As the antibodies go active, Amy tells Carter to stop River’s punishment. When he refuses, she shorts out the crew’s bracelets and then runs out of the command center with Rory. Carter orders Jim to shut down the entire system, including the torture device.
The Doctor tells the freed River that now they have to save her parents.
When they’re unable to shut down the antibodies, Carter calls the mothership and asks for beam up. Once they leave, only Amy and Rory are left aboard the Justice vehicle. The antibodies close in on them and Amy calls for help. Outside, the Amy-drone echoes her words. The Doctor crawls toward the TARDIS as River watches, surprised that he still cares. He begs her for help, calling her River, and River wonders who he’s talking to. She asks him to describe River, but all he can do is shiver in pain.
Amy and Rory run for the exterior eye port and try to activate the miniaturization device. The antibodies surround them and the couple tells each other that they love the other. However, the TARDIS materializes around them just in time.
They discover that River is the one who piloted the ship, after the TARDIS taught her. The Doctor called her the Child of the TARDIS, and River asks them what he meant. They go back to the restaurant and Amy tells the Doctor that he can’t die now. He asks for a minute alone with River and tells her that she has to find River Song and tell her something. The Doctor whispers in her ear and she tells him that she’s sure River knows. He dies and River asks Amy and Rory who River Song is. Amy turns to the Amy-drone and tells it to bring up the files on River Song. It takes on the form of River, and River realizes who she is. Amy asks what message the Doctor passed on, and River glows with regenerative energy. She asks Amy if the Doctor is worth it, and Amy insists that he is. River touches the Doctor and kisses him, transferring her remaining regenerative energy.
Later, River wakes up and finds Amy, Rory, and the Doctor at her bedside with the Sisters of the Infinite Schism. Amy tells her that she used up all of her regenerative energy to save the Doctor. As River dozes off, the nurse says that she’ll be fine, but the Doctor says that she will not just fine but amazing. He leaves a new TARDIS diary on her bed table and then leaves with his companions. He assures them that River will be fine and she needs to make her own way from now on. The Doctor briefly glances at a file he stole from the Justice Department, the file on the time of place of his death. He quickly shuts it off before Amy can see it. Rory wonders about River’s brainwashing and notes that the River they know in the future is in prison for murder. The Doctor simply smiles and says that River will find them eventually, and Amy wonders how anyone can find him.
At the Luna University in 5123, River meets with Professor Candy and says that she wants to study archaeology. When he asks why, she says that she’s looking for a good man and glances at the TARDIS diary.