We pick up where Part II left off. 1955 Doc (Christopher Lloyd) has just finished helping Marty's counterpart return to 1985, and is running down the street shouting and laughing victoriously. Marty runs to him and grabs him from behind. Doc is shocked, saying that he just sent Marty back to the future. Marty says that he's back from the future, and Doc faints.
Doc awakens the next morning back at his house, with the TV playing Howdy Doody, not quite sure how he got home. Marty is dozing in a chair nearby, resting his feet on his hoverboard. Doc gets out his recorder and notes that he may have seen a vision of Marty afterwards saying he had 'come back from the future,' but thinks he may have been hallucinating. This turns out to be a reality, when Marty appears, scaring Doc, whose flailing hands play ominous chords on his organ.
Marty explains that he came back to 1955 in regards to recovering the sports almanac from Biff to save the future. Marty then explains that afterwards, the 1985 Doc was in the DeLorean when it got struck by lightning, which sent him back to 1885. Doc questions how Marty would know this, when Marty reveals the 70-year-old Western Union letter he received.
Doc reads over the letter. His 1985 version notes that the DeLorean has been hidden in the Delgado gold mine, with instructions for replacement parts for the 1955 Doc to help repair the time machine. The letter also notes that the flying circuits were destroyed by the lightning strike, meaning the DeLorean will never be able to fly again. 1985 Doc instructs Marty to take the DeLorean back to 1985 and destroy it, as he thinks the time machine has caused too much destruction. Doc explicitly warns Marty to not come back to 1885 to get him, as he is perfectly content living out the rest of his life in the Old West.
Later that morning, Doc and Marty go to the abandoned Delgado mine, located at Boot Hill Cemetery, and use dynamite to blast their way in. They locate the DeLorean when they find a cross beam with Doc's initials blocking up a side tunnel. They find the DeLorean under a tarp inside another tunnel. They find the tires have decayed and the gas tank has been emptied.
After an afternoon of digging, Doc and Marty remove the DeLorean and hitch it up to a tow truck, preparing to tow it back to Doc's laboratory. As they are preparing to leave, Doc's dog Copernicus starts whimpering. Marty walks over to investigate and see what is troubling Copernicus, and to his shock, finds a tombstone with the inscription, "Here Lies Emmett Brown, Died September 7, 1885". Marty realizes that this means Doc died about a week after he wrote the letter to Marty and left it with Western Union . The tombstone says it was "erected in eternal memory by his beloved Clara", a name unknown to either Marty or Doc. More alarming to Doc is that the tombstone notes he was "shot in the back by Buford Tannen over a matter of 80 dollars".
Doc is shocked to see just what his fate living in 1885 is. Marty and Doc take a picture of the tombstone, and then go to the local archives to try to find more information about Doc's killer. They learn that Buford "Mad Dog" Tannen (Thomas F. Wilson) was a notorious gunman who got his nickname "Mad Dog" from his short temper and his tendency to drool. He bragged that he had killed 12 men ("not including Indians or Chinamen"), but this claim cannot be substantiated because in 1884, Buford killed a newspaper editor who had written an unfavorable story about him. Marty and Doc also find information about the McFly family living in Hill Valley in 1885. Marty is skeptical about the possibility that the "Emmett L. Brown" on the tombstone is Doc, but Doc says it can't be him because the Browns did not first arrive in Hill Valley until 1908....and then they find a photo of Doc posing next to the under-construction clock on the clock tower. Even though Marty has been told to return to 1985, he tells 1955 Doc that he is instead going to 1885 and save Doc from being killed by Tannen.
After Doc manages to repair the time machine, he provides Marty with a cowboy outfit (albeit one that is almost too colorful for the old west), and takes them to a closed Drive-In theater near an open-area of land. Doc explains that since the open country hasn't changed much in over 70 years, Marty should be able to avoid anyone seeing the time-machine, or possible crashing the DeLorean.
Doc then sets the time circuits in the DeLorean to September 2nd (since the letter was written on September 1st. This is done so that Marty cannot interfere with Doc writing the letter and having it given to Western Union...to avoid a possible time paradox), and Marty drives off. However, once arriving in 1885, he finds himself almost run over by a group of Indians, followed closely by Cavalry men who are chasing them.
Marty drives the DeLorean across the rocky terrain, before finding a small cave to hide the DeLorean in. However, after getting out, Marty discovers two problems: first, the rocky terrain has somehow ruptured the vehicle's fuel line, and second, a bear is also in the cave. Marty quickly rushes away from the bear, but falls down a nearby hillside, crashing into a fence, and falling unconscious.
When he wakes up, he finds himself in the home of Seamus McFly (also Michael J. Fox), and his wife Maggie (Lea Thompson), and their infant son, William. Marty soon realizes he is in the homestead of his ancestors, and claims that his name is Clint Eastwood, when they ask him who he is. During dinner, Marty explains his searching for the local blacksmith, and Seamus offers to help.
Marty gets a new hat from Seamus. The next morning, following Seamus's advice, Marty follows the railroad tracks to the train station for Hill Valley...albeit a Western mining town that is still being developed. Even the iconic clock tower that Marty knows is still being constructed, with a dedication to take place the coming weekend.
Marty then goes to the Palace Saloon, where he orders whiskey after some confusion. Just as Marty is asking where he can find the local blacksmith, Buford and his gang come in, mistaking him for Seamus. Marty manages to convince them his name is "Clint Eastwood". Buford asks the bartender where the blacksmith (Doc) is, and the bartender says he doesn't know where he is. This causes Marty to realize he's talking to Buford, and inadvertently calls him "Mad Dog". Unfortunately, it turns out that everyone knows Buford becomes enraged whenever someone calls him "Mad Dog," because almost on cue, every single individual in the saloon either runs away or hides. Buford immediately pulls out his revolver and begins shooting at Marty's feet to make him "dance." To distract Buford, Marty begins to moonwalk like Michael Jackson, before accidentally launching a spittoon full of tobacco juice on Buford. Now furious, Buford intends to kill Marty, who rushes out of the saloon, but not before Buford and his gang lasso him and drag him through town, before intending to hang Marty on a pulley and rope at the site of the clock tower building.
However, Marty is saved when Doc appears with a large rifle bearing an elaborate scope that "can shoot the flea off a dog's back at 500 yards," and severs the rope with a single shot, freeing Marty. Buford turns his anger on Doc, unhappy with a shoeing job Doc recently did for one of his horses. Buford demands $80 from Doc, as the $75 horse threw one of its shoes a few days ago, throwing Buford off, and also causing him to break the $5 bottle of whiskey he was carrying at the time. Buford subsequently shot the horse. Marty realizes that this is the matter of $80 that Doc's tombstone says he will be killed over. Doc claims that Buford shooting the horse evens things out since Buford never paid him for the work and Buford warns Doc to watch his back, before he and his gang ride off on their horses.
Turning his attention to Marty, Doc is upset that Marty did not follow his instructions, but once they get back to the blacksmith shop, Doc is given the information about his impending doom. The mention of "beloved Clara" also doesn't ring any bells with Doc, but that is when Mayor Hubert stops by, and reminds Doc that he agreed at last week's town meeting to pick up the new school teacher. They've just received word that she's coming in tomorrow morning. As an afterthought, the mayor offhandedly tells Doc the teacher's name is Clara Clayton. Marty and Doc now know who will erect the tombstone in his memory.
Doc then decides that to avoid getting into any kind of time-altering love affair, he will simply not pick up Clara from the train depot the next day and decides that they should get the DeLorean Marty came back in, and go. However, when Marty explains that the fuel line is ruptured, Doc's eyes go wide. Marty explains that as long as they have the Mr Fusion generator, they should be able to get back. It is then that Doc explains the flaw in Marty's thinking: Mr Fusion powers the time circuits and the flux capacitor, but the car still needs gasoline to run... gasoline that will not appear until several years into the 20th century.
Doc and Marty then recover the DeLorean, and try everything from a team of horses pulling the vehicle, to using an incredibly strong alcoholic drink. The horses cannot pull the DeLorean above 24mph, and the alcoholic drink ends up destroying the fuel-injection manifold on the car which will take Doc a month to rebuild.
Realizing that the DeLorean can't run under it's own power, and they can't pull it, Doc figures they will need to push it up to 88 mph. Hearing the whistle of the train pulling into the station, he surmises a possible solution.
Doc and Marty go to talk to the engineer, and pretend to have a wager going to see if a steam engine could get up to 90 mph. The engineer explains that it most likely would depend on three factors: having a long-enough section of mostly straight track, preferably on a downhill grade; having no cars coupled behind the tender to lighten the amount of horsepower lost; and getting the fire hot enough without blowing up the boiler. Doc soon finds that the next train coming through the area will be on Monday morning at 8am. Checking a railway map, Doc finds what they are looking for: a long straight stretch that goes over Clayton ravine (oddly called Shonash, the old Indian name for the ravine). In 1985, the tracks run near the Hilldale housing development, but Marty notes that in 1885, there is no bridge spanning the ravine.
Going out to see for themselves, Marty decides they have to change their plans: the trestle is partially complete, and will not be finished for another 18 months according to a sign at the bumper block. Doc however, tells Marty he is 'not thinking fourth-dimensionally.' In 1985, the bridge will exist. With this reasoning, if they can reach 88mph before they reach the edge of the ravine, they'll instantly time-travel to 1985 when the bridge is completed, and simply coast right across.
As they prepare to head back to town, the panicked cries of a woman on a runaway buckboard wagon catches their ears. Doc manages to save the woman before the wagon hits a rock, uncouples from the runaway horses, and crashes over the side of the ravine. To both Marty and Doc's shock, it's Clara Clayton (Marty Steenburgen). She'd lost control of the horses when they'd been scared by a rattlesnake. Doc and Marty escort her to her new house adjacent to the town's schoolhouse. Doc explains to Clara that he'll clear up the issues with the owner of the buckboard rental business in town, and tells Clara that he also has a shop. However, he falters by first saying he's a scientist, which piques Clara's interest. Marty eventually tells Doc they have to be going, and they head off.
As they go a ways off, Doc makes mention how Ms Clayton almost ended up at the bottom of Clayton Ravine. It's then that Marty remembers the history of the ravine that was taught to him in school: Clayton Ravine was named after a school teacher who fell in there 100 years ago (meaning 1885) and how all his classmates "have teachers they'd like to see fall into the ravine." Doc now realizes that they may have seriously changed history, and curses inventing the time machine, believing it has now continued to ruin things.
The next day, Doc has finished outfitting the DeLorean with standard gauge track wheels, and shows Marty a scale miniature of his plan for getting them back:
The next night, they'll load the DeLorean onto the tracks along the stretch near an abandoned silver mine. When the 8am train leaves the station on Monday morning, they'll stop it at the switch track, uncouple the extra cars and then hijack (or "borrow" to use Doc's term) the locomotive, and use it to push the time machine. Doc calculates that they'll get the engine to 88mph, time travel back to 1985, and coast across the completed bridge.
Marty notices a windmill marked as their "Point of no return." Doc explains this is the fail-safe point. At this point, they can still stop the train before it reaches the ravine, but once they pass the windmill, there's no turning back.
The explanation is cut short when Clara appears. Clara has brought her telescope to Doc in hopes he might be able to fix it, as it was damaged in the buckboard accident. Doc quickly explains he can fix it and have it done that evening. However, Clara reminds him that the Town Festival will take place, but Doc still says he'll have it fixed by then. Clara then leaves, saying she hopes to see Doc (whom she calls "Emmett") and Mr. Eastwood there.
That night at the festival, the clock that will eventually grace the clock tower is activated, and a number of the citizens can have their photo taken in front of it. Marty and Doc decide to pose with the clock, as it has so far played a big role in their lives.
As the festival goes on, Doc meets Clara, and the two dance. Meanwhile, Marty takes part in a Colt firearms demonstration, and runs into Seamus, Maggie, and William McFly again.
Meanwhile, Buford and his men have come to town, with Buford intending to take care of Doc. After surrendering their firearms to Marshal Strickland (James Tolkan) and his Deputy, the group enters, but not before Buford pulls out a concealed Derringer revolver he has snuck in. Buford ends up sneaking up on Doc, threatening to shoot him. With the small-caliber barrel of the tiny gun buried in Doc's back, the shot will be muffled. Buford also growls to Doc that someone who's shot with the gun will take a few days to die from internal bleeding -- Doc will linger for a few days before dying on Monday, September 7th. Buford then catches sight of Clara, he demands a dance. Doc becomes the gentleman in the moment and demands that he'd rather be shot, but Clara says she'll dance with Buford to save Doc. Clara dances with Buford for a bit before kicking him in his shin. Buford strikes Clara, knocking her to the ground, before Doc's voice shatters the moment, yelling for Buford to stop what he's doing. Furious, Buford raises his gun and prepares to shoot Doc in the head. Before he can shoot, Marty grabs a Frisbee company pie-plate, and flings it, knocking off Buford's aim, causing Mad Dog to lose his only shot. Marty demands that Buford leave his friends alone, but Buford then manages to provoke Marty by calling him "yellow."
Wanting to prove Buford wrong, Marty agrees to a dual at 8am on Monday. After Buford and his gang leaves, Doc has a few words with Marty, but not before Clara comes up, and Doc says he'll take her home.
Marty is then accosted by several men who are ecstatic that he has the guts to stand up to Buford. One of them is the Colt firearms man, who gives Marty a Colt Peacemaker to use in the duel (with the promise that if Marty loses, the salesman gets the gun back).
The only naysayers in the group are Marty's ancestors, who chastise him for giving in and not just walking away. Case in point: Seamus and Maggie recall Seamus's late brother Martin. He was a very tough person, but he also picked fights whenever someone called him a coward, which turned out to be his downfall when someone fatally stabbed him in the chest during a brawl at a saloon in Virginia City.
Back at Clara's house, she and Doc are watching the stars, when their conversation turns to Jules Verne, an author whom both of them love, and Doc and Clara realize they have each met someone very special.
The next morning, Marty goes out walking and encounters Doc, having come back from Clara's, with a big smile on his face. As they walk through town, they one of the stores has finished making new tombstones...one of them just like the one seen at the Boot Hill Cemetery in 1955. Doc checks the photograph, and notices the tombstone and the date are still apparent, but there's no inscription on who is buried there.
As they continue to talk, the town undertaker comes by, measuring Marty for a coffin. When Marty asks why, the undertaker explains that there are betting odds in town that he will lose...and Doc explains that the tombstone could now be meant for Marty.
"Great Scott!!" says Marty, realizing he could soon end up dead.
"I know, this is heavy," says Doc.
Doc then notices the Colt Peacemaker that Marty is carrying, and Marty explains that he intends to get back at Tannen for calling him 'yellow.' Doc chastises Marty for going through with this, and explains how this causes the Rolls-Royce incident affecting his 2015 life. Marty is now curious about this unmentioned information about his future, but Doc refuses to say more.
Later that evening, after installing the DeLorean onto the tracks, Doc explains that he is not going back, and intends to stay with Clara. However, after some talk, Marty tells Doc that this could very well continue to ruin the space-time continuum. Doc regards his friend's request, but still decides to go to Clara, to say goodbye.
Going to her house, Doc attempts to say goodbye in a subtle way, but Clara realizes he is keeping something from her, and wants to know the truth. Wanting to be honest with her, he explains that he is from the future and is going to return there the next day. Instead of understanding, Clara feels that he is lying as a way to say he doesn't love her anymore.
Heartbroken, Doc goes to town, and into the saloon, requesting whiskey. A salesman sees Doc, and engages him in conversation. As the conversation they are discussing mentions the word 'future,' Doc then begins to preach about what the future will bring.
The next morning, Marty wakes up, but finds Doc gone. Heading into town, he finds him still at the saloon, still awake after all this time, the untouched whiskey on the bar. Marty manages to shake his friend out of his depression, and the two head off...but not before Doc drinks a toast to the future...with the whiskey knocking him out cold!
The bartender mixes a concoction that manages to wake Doc out of his stupor, but still has him knocked out. As Marty and the bartender continue to try and revive Doc, Seamus arrives in the bar, claiming that 'something told him he should be there.'
Just as it seems things can't get any worse, Buford arrives, and demands the duel to take place immediately. The others in the bar demand Marty fight Buford, but seeing Seamus looking at him, and thinking of the consequences of his actions, Marty decides not to go through with it...just as Doc revives!
The two try to sneak out the back of the saloon, only to be seen by Buford's gang. Doc is captured, while Marty ends up diving into the building next door. Buford then gives Marty an ultimatum: either come out in 1 minute, or Doc will be shot.
Meanwhile, heartbroken from the 'lie' she was told, Clara has boarded the 8am train, intending to head to San Francisco. As she sits in one of the coaches, the salesman who was talking to Doc the previous night tells the guy sitting next to him about the 'heartbroken' man he met the previous night, who had a girl he loved named Clara. Hearing this, Clara asks and confirms that it was Doc he was talking to. Pulling the brake cord on the train, the engine barrels to a stop, and she rushes back towards Hill Valley.
Back in town, Buford's minute is up, and Marty appears. Marty drops his weapon, claiming he wishes to settle the dual 'like men.' However, Buford shoots Marty in the chest, and he goes down. Chuckling over his kill, Buford is then shocked when Marty rises up from the ground, revealing like his hero in A Fistful of Dollars that he is wearing the steel door to an iron stove under his clothing and that it stopped the bullet. Marty gets in several good punches, before Buford finally is knocked out and collapses into a manure cart.
During the battle, Buford is knocked into the tombstone that was in the photo. As Marty and Doc look at the photo, the tombstone disappears. Just then a deputy marshal rides in and arrests Tannen for robbing a stagecoach. With their business now about getting back to the future, Marty gives Seamus the Colt Peacemaker, telling him it's worth $8, and he and Doc head off toward the train.
Meanwhile, Clara has made it back to town, but finds Doc's blacksmith shop deserted. However, her attention is then drawn to the miniature, of which sits a strange vehicle with the words 'time machine' written on it.
Doc and Marty manage to 'borrow' the locomotive, and switch it over to the new track. Prepping the DeLorean and the train, Doc pulls out some colored logs that he calls 'presto logs,' which will help push the train to the desired speed they need.
After the first two logs go off, Doc attempts to climb onto the DeLorean, but not before hearing the steam whistle of the train! Turning back, Doc sees that Clara has caught up to the train, and is now aboard, calling out that she loves him. Doc intends to go back to the cab, but just then, the DeLorean passes the windmill, cancelling any chance to stop the train.
Doc then decides that they will then take Clara back with them, and has her climb out to him. However, just before they reach each other, the final log explodes in the furnace of the train, jolting the engine and causing Clara to almost fall over the side.
Marty helps Doc by throwing him the hoverboard, which Doc uses to save Clara. Marty watches as the two hover off to the side, before shutting the door. The DeLorean then reaches 88mph and disappears...with the locomotive barreling over the side of the ravine, and exploding in a huge fireball.
Marty then finds himself back in 1985, as the DeLorean coasts over the completed bridge (now spanning "Eastwood Ravine"). As the DeLorean coasts through a grade crossing, we see the lights flashing and the gates lowered, and motorists looking at Marty oddly. Just then, a train horn is heard, and Marty sees a diesel engine barreling head-on toward the DeLorean. With no time to save the car, Marty jumps clear as the engine plows into the time machine, destroying it. Once the train has passed, Marty looks over the wreckage, and finds the Flux Capacitor and the Time Circuits (both of which give a small flash before falling silent). "Well Doc," says Marty, sadly, "It's destroyed. Just like you wanted."
Returning to the Lyon Estates, Marty is ecstatic that everything is back to normal, including his family and Biff (no longer the tyrant of the altered timeline from the second film, but the secretly-bitter auto detailer). Worried about Jennifer, Marty gets in his Toyota 4x4, and goes to her house to find her still sleeping on the porch like she was when Marty left her in 1985-A. Upon waking up, Jennifer tells Marty that she had a terrible nightmare.
As they drive past the still-in-development Hilldale housing complex, one of Marty's classmates named Needles pulls up next to the two in a Ford Bronco and challenges Marty to a race. Marty declines at first, until Needles calls him 'Chicken.' However, when the light they are at turns green, Marty throws his vehicle into reverse, not going through with the race.
As he and Jennifer watch, a white Rolls-Royce comes out of a sidestreet, and Needles' truck barely misses it. Marty remarks how he would have hit that car, causing Jennifer to reach into her coat pocket...finding the "YOU'RE FIRED!!!" fax from 2015, with the words slowly fading away (proving that Marty's decision has now changed their future).
The two return to the wreckage of the DeLorean. As they are looking, the grade crossing suddenly activates even though there is no train in sight. Suddenly Marty and Jennifer are blown back as a vintage steam-engine appears with the DeLorean's sonic boom, piloted by Doc, who cheerfully tells Marty that his new invention runs on steam. Doc then introduces the two to Clara, as well as their sons: Jules and Verne. Doc then tells Marty that he decided to return to get Einstein, and to let Marty know he was all right.
Doc also presents Marty with a framed picture of the two of them, taking at the clock dedication in 1885.
Jennifer then tells Doc of the fax she had from the future, that is now erased. Doc explains that this simply means their future is theirs to make of it what they will.
Doc then prepares to return with his family back in time.
"Hey Doc," asks Marty, "Where are you going now? Back to the future?"
"Nope," says Doc, with a smile and a wave," already been there!"
As Marty and Jennifer watch, The steam engine's wheels fold underneath, turning into a hover train, and it rises into the air, circles around, before reaching 88mph, and flying at the camera.