On November 12, 1955, Dr. Emmett Brown, stunned to see Marty McFly in 1955 after just sending him back to 1985, faints outside the Hill Valley courthouse. Marty takes Doc back to the Brown mansion to recover. Once Doc revives, Marty and Doc use the information in Docs 1885 letter to retrieve and repair the damaged DeLorean. However, as they retrieve the car, Marty spies a tombstone with Doc's name, dated six days after the letter. After learning Doc was killed by Biff Tannen's ancestor, Buford "Mad Dog" Tannen, Marty decides to go back to 1885 and save Doc.
Marty arrives on September 2, 1885, in the middle of a United States Cavalry pursuit of Indians. In his attempts to evade the pursuit, the car's fuel line is torn, and Marty hides the car in a cave. While walking to Hill Valley, Marty meets his Irish great-great-grandparents Seamus and Maggie McFly; to disguise his identity, Marty adopts the name "Clint Eastwood". In town, Marty runs afoul of Buford and his gang, who try to hang Marty, but Doc saves him. Doc agrees to leave 1885, but discovers that with the fuel tank in the DeLorean empty and the flying circuits destroyed, there is no way to power the car. Doc devises a scheme to use a locomotive to push the DeLorean up to speed. As Doc and Marty explore the rail spur they intend to use, they spot an out-of-control horse-drawn wagon. Doc saves the passenger, who turns out to be Clara Clayton. The two fall in love, finding many common interests, especially the works of Jules Verne. Buford tries to kill Doc at a town festival over a grudge, but Marty intervenes; Buford then goads Marty into a showdown in two days time. Consulting the picture of Doc's tombstone, they note that Doc's name has disappeared, but the tombstone - and the date upon it - has not changed.
The night before their departure, Doc tells Clara he is from the future, but a disbelieving Clara spurns him. Heartbroken, Doc returns to the town saloon to get drunk. Marty rides to the saloon and convinces Doc to leave with him. Unfortunately, Doc drinks a single shot of whiskey to celebrate his departure and passes out. Buford arrives and tries to call Marty out, hurling insults at him. Marty realizes that his reputation is unimportant and refuses to fight Buford. Doc revives and tries to flee with Marty, but Buford's gang spots them and captures Doc, forcing Marty to fight to save Doc's life. Marty uses a firebox door from a stove as a bullet-proof shield, and then hits Buford in the face with it. During the ensuing fistfight, Buford destroys the tombstone (which vanishes from Marty's picture), is knocked unconscious, and is then arrested. With Buford no longer a threat, Marty and Doc ride after and steal the locomotive.
Clara, meanwhile, is on the train leaving town when she overhears a salesman discussing a man he'd met in the saloon, utterly despondent about his lost love; realizing the man was Doc, and that he is still in love with her, Clara triggers the emergency brake and runs back to town. She discovers Doc's model of the time travel experiment and rides out after him. Clara intercepts and boards the speeding locomotive while Doc is climbing his way towards the DeLorean. Doc encourages Clara to climb out to him, intending to bring her with them to 1985. Just then, the locomotive's boiler explodes; Clara falls off the side of the locomotive and hangs precariously by her dress. Marty passes Doc his hoverboard from 2015, and Doc uses it to save Clara. However, they can't catch up to the DeLorean, which disappears through time, while the locomotive roars over the edge of the incomplete bridge and is demolished.
Marty arrives safely on October 27, 1985, but the powerless DeLorean is destroyed seconds later when a freight train strikes it head-on. Marty returns to his home, discovers that everything has returned to the improved modified timeline, and finds Jennifer still sleeping on her front porch swing. Later, Marty avoids being goaded into a street race with Needles, thereby avoiding the potential automobile accident. Jennifer then opens the kept fax message from 2015 and finds the message regarding Marty being fired erased.
Marty takes Jennifer to the time machine wreckage, but as they survey the remains, a steam-powered locomotive equipped with a flux capacitor appears, manned by Doc, Clara, and their children, Jules and Verne. Doc gives Marty a gifta photo of the two of them by the clockworks at the 1885 festivaland explains to Jennifer that their future is "whatever you make it, so make it a good one". After the Browns bid farewell to their friends, Docs train then converts into an aerial craft and roars off into an unknown time, ending the trilogy.
Sure, respect the flux capacitor and Mr. Fusion. Pay Dr. Emmett L. Brown and his co-pilot cohort Marty McFly their due. But when you do so, admit this much: there is no time-travel without John DeLorean's DMC-12 with the gull-wing doors. And now, one collector has a piece of "Back To The Future" history.