In May 1986, after the events of Back to the Future Part III, Marty McFly is disheartened to see Dr. Emmett "Doc" Brown's laboratory being sold off by the bank, his friend having disappeared in the months since. After recovering Doc's notebook outlining time travel from his father George, Marty is surprised by the sudden appearance of the DeLorean time machine outside the lab, but with no one but Doc's dog, Einstein, inside. Marty had thought the machine was destroyed, but a pre-recorded message from Doc explains that he had programmed the car to return to the present should he become stuck in the past. Marty follows a clue in the car to the home of bitter, elderly Edna Strickland, a former reporter in Hill Valley. From her newspaper collection, Marty finds Doc will be killed in 1931 by the mobster Kid Tannen, Biff's father, for burning down his speakeasy.
Marty and Einstein use the DeLorean to travel to 1931 to rescue Doc. Marty encounters younger versions of both Edna, a morally upright citizen, and Emmett, a lanky teenager helping his father with courthouse duties but trying to pursue a career in science against his father's wishes. Marty also encounters Artie, his grandfather, who acts as Kid Tannen's accountant, who fears crossing his boss. Marty convinces Artie to testify against Kid Tannen, placing the mobster under arrest and preventing Doc's death. Marty later rescues Doc during transport, and they return to the DeLorean. However, Marty finds himself disappearing, which Doc attributes to interfering in his own timeline; as a result of Marty's action, Artie will later be killed by Tannen. The two return to earlier in the day to convince Artie to leave town for a while for protection, enlisting both Edna and Emmett's help to avoid encountering their earlier selves. Marty and Doc prepare to leave for the future, unaware their actions have caused Emmett to start dating Edna.
When Doc and Marty arrive at the present, Doc soon vanishes, and the driveless car crashes into a billboard. Marty finds that Hill Valley has become a totalitarianism society, overseen by "Citizen Brown". Finding his parents and girlfiend Jennifer unhappy with this new history, Marty discovers that Emmett forwent his science background and instead married Edna, who prompted him to construct the morally-correct city backed on his technological knowhow. Marty manages his way to see Citizen Brown, and explains how this is not his real future, showing him Doc's notebook. Brown realizes his true calling, and makes the repairs to the Delorean. Edna attempts to stop the two from leaving, but they are able to outwit her.