David has realised his childhood dream of playing the Doctor, a time-travelling alien who explores the universe and saves people and civilisations, in the television programme Doctor Who. He’s had a very successful run of three series of episodes and has decided to leave on a high note. He’s just completed filming “The Next Doctor”, the first of his last five episodes and he’s on his way to visit a friend in Birmingham when he gets into a car accident. However, just before his car impacts the one in front of him, it suddenly halts and he blacks out when he hits the airbag.
When he awakens, he finds himself in the real TARDIS, tended by the Doctor - the incarnation that follows the one he played - and his two companions, Amy and Rory. David discovers that he’s now in the universe of Doctor Who, and the television programme in his own universe somehow told the accurate story of the Doctor in this new universe. The Doctor has no way of getting David back to his universe, and so the actor must figure out how to establish a new life here. At Amy’s urging, the Doctor agrees to take David on as a companion for a bit, while he finds his feet.
The TARDIS crew proceeds to explore the universe as usual, and David tries to adjust to life as an adventurer, though he’s quite sure he’s not up to it, having nothing to contribute as he doesn’t feel that acting doesn’t provide many useful life skills. During his first outing, a visit to Cambridge that was a misguided attempt by the Doctor to make David feel at home, he helps foil a group of aliens harvesting human organs by posing as a doctor to get Rory to an MRI machine, which the nurse used to fire off an EMP pulse to disable the aliens’ cybernetic implants. In his second adventure, the crew visits a colony ship from Polthara V, and David is disabled by a psychic attack by a rebel Polthite. The Doctor teaches him that though the Polthites are powerful psychics, they find strong emotion very painful, and when the Polthites have the Doctor at knifepoint, David uses that information to drive them off with his fear and anger.
Rory and David find in each other very good friends, possibly due to the fact that they’re the only normal people in the TARDIS. They both want to return to their own lives back on their respective Earths, but cannot. David finds Rory to be a good anchor, and Rory feels that he can confide in David.
While trying to take the crew to visit London in 2023, the Doctor misses his target and lands the TARDIS in a slave ship in orbit around the Earth. The aliens have been capturing humans to sell into slavery, imprisoning them in the cargo holds of their ship, and at the arrival of these intruders, they set the self-destruct mechanism to go off in thirty minutes while they escaped, and the TARDIS crew chooses to use the time to free the humans using the transmats rather than chase after the slavers. A group of the humans find the last escape pod and attempt to escape in it, but the Doctor tells Amy, Rory, and David that firing the last pod will cause the slave ship to auto-destruct immediately (since it means the ship has been abandoned) and that they must stop its launch or everyone dies. Running to the pod to evacuate it, David looks in and sees Donna and her mother. Knowing that his appearance could cause Donna to remember the Doctor and burn up and die, he must choose between her life and the lives of everyone on the slave ship. He has to put the lives of the many over that of the one, no matter who she is, and when he steps into the pod, he finds that he was right: Donna sees him and begins to remember, and she dies in his arms, believing that he is the Doctor and that he returned for her.
It takes David a while to deal with his guilt for what he’s done to Donna. When he finally recovers, the Doctor detects a distress signal and follows it into the time vortex, landing the craft on what seems to be a derelict human spaceship. They soon find out why it’s drifting: a Dalek has killed almost everyone on board. While Rory and David are in the TARDIS fetching medical supplies, the Dalek traps the Doctor in a force field and Amy flees further into the ship. The Dalek demands the TARDIS’ temporal stabiliser so that the Dalek can use its damaged emergency temporal shift to return to the fleet. The Doctor, of course, refuses and the Dalek begins to search the ship for Amy, to use her as leverage.
With no weapons beyond their own skills, David and Rory realise that they can’t hope to defeat the Dalek, and David comes up with a plan to distract it whilst Rory disables the force field and release the Doctor. He dresses himself in the previous Doctor’s clothing and the TARDIS provides him with an appropriate sonic screwdriver. He dives under the console and pulls off a couple of components, which he drops in his pocket, then hands Rory the screwdriver, telling him to use it on the forcefield panel to disable it when he sees an opening. Recognising that something’s wrong, Rory confronts David, who tells him that he’s becoming the Doctor. David then goes out and distracts the Dalek, which is confused by being confronted by two Doctors. Rory disables the panel, freeing the Doctor, and the two Doctors use the TARDIS components to activate the Dalek’s emergency temporal shift and send it beyond the end of the universe.
When they return to the TARDIS, David is dazed, but he comes out of it angry, attacking the Doctor for withholding vital information: his real identity. When he was outfitting himself in the Doctor’s costume, he found a fob watch in the pocket of the overcoat, and he realised that he was, like John Smith, just a fiction, a human version of the Doctor. The Doctor explains that his previous incarnation, after his catastrophic failure on Mars, decided to flee from himself by making himself a human child, intending to live a human life and die a human death; the TARDIS saved him from that by fetching David from the other universe. The Doctor had been living through the paradox ever since, as both David and the Doctor, because he knew that his previous incarnation had to learn, through David’s experiences, why he did what he did and why it was worth the price he pays. David realises that he must sacrifice his life to bring the Doctor back, because the Doctor is already back and thus his sacrifice has already happened, and that his story, reminding the Doctor of who he is, is quite brilliant. He opens the watch and the Doctor returns.