Alex Hartdegen is a scientist living in 1899 New York City. Obsessed with the idea of time travel, he teaches at Columbia University as a professor of "Applied Mechanics and Engineering" and gets into trouble for his radical theories. He is a pen pal of Albert Einstein.
As he goes to the park to meet his girlfriend Emma, he becomes distracted by an early motor car beside the park gates. He puts himself in immediate good graces with the driver who, while refueling, forgot to activate the parking brake something Alexander does quickly when it threatens get out of control.
Forgetting the flowers, he meets Emma at the skating rink; they walk through the park where Alexander proposes to Emma. However, the romantic moment is short-lived: a robber emerges from nearby bushes and holds a gun on them. As the thug attempts to take Emma's engagement ring, Alexander tries to intervene; during the struggle, the gun goes off and Emma is fatally wounded, dying in Alexander's arms.
For the next four years, Alexander spends every waking hour in his laboratory working on his time travel calculations. Eventually, he succeeds in building a working time machine. His self-imposed exile has led to him being ostracized from his oldest friend David Philby, who eventually arrives at the lab to confront Alexander who in turn flies into a rage.
Philby invites Alexander to dinner in the hope it would cause him to leave the lab and eventually return to a normal life, but Alexander postpones the dinner until the following week; after Philby has left Alexander remarks that in a week they "wouldn't have had this conversation".
With the time machine finished, he travels back to that night four years ago and intercepts Emma before she was destined to meet his 1899 counterpart. Escorting her away from the park, they walk back to her apartment where he leaves her out in the street to purchase some flowers.
However, despite Alexander having removed her from the danger of the robber, Emma is knocked down and trampled by a horse and carriage outside. The horses were spooked by the early motor car. Alexander realizes bitterly that if he prevents one means of Emma's death, another will take its place. Disenchanted with the prospect, he decides to go forward in time to find out if there are any answers in the future. The time travel Alexander stops in 2030 and learns that the Moon is being prepared for colonization.
He visits the New York Public Library where he talks with Vox 114, the library's holographic, artificially intelligent librarian. He is given information on H. G. Wells, Isaac Asimov, Harlan Ellison and even one of his own papers, but the library does not have any information on time travel theory; Vox states that such a thing is impossible. Frustrated, Alexander asks about the time machine itself and is given information on H.G. Wells' novel.
Finding nothing of use, Alexander moves on to the future, until he hits a 'bump' seven years later in 2037, where he finds that the Moon mining operation has disrupted the lunar orbit. As a result, the Moon is breaking apart and showering Earth with massive chunks of rock. His presence outside of a shelter leads to an attempt by two military personnel to arrest him, but he escapes.
He makes it into the machine just as the city is being destroyed, but is knocked unconscious and fails to witness the destruction of civilization. Alexander and his time machine speed through hundreds of millennia. Regaining consciousness, Alexander brings the machine to a halt in 802,701 AD, and finds that civilization has devolved to a hunter-gatherer lifestyle. Calling themselves the Eloi, these survivors have built their homes into the side of a cliff on what resembles Manhattan.
Alexander begins to develop a relationship with a woman named Mara, a teacher, and one of few who recall some of the Time Traveler's now obsolete language. He also realizes the Moon is now broken in pieces. As Alexander is introduced to Eloi society, he is shown a collection of stone fragments and signs from what was once New York, including a sign from Tiffany and Co, the Empire State Building and a section of tiled panels from Brooklyn Bridge-City Hall Subway Station.
While Alex is inspecting the machine after seeing an Eloi memorial for their parents, Mara tells him to go back to his own time and take her younger brother Kalen with him. Suddenly, the Eloi are attacked by Morlocks, monstrous, pale, ape-like creatures that hunt the Eloi for food. The Morlocks capture Mara and carry her off.
Trying to find out where she has been taken, Alexander is told that "the Ghost" might know. As it turns out, the Eloi are speaking about Vox 114, the holographic librarian that Alexander had talked to before the destruction of the Moon, who is still functioning after all these years.
With Vox 114's help, Alexander finds a way into the underground realm of the Morlocks, but is captured and taken to an underground chamber where Mara is kept in a cage, and where the Morlocks' leader, the Über-Morlock, is waiting. The Über-Morlock reveals that they have a caste-like society, with each caste (nearly a different species in itself) fulfilling a different role in Morlock society. The ruling caste of this society are super-intelligent telepaths, while the hunters that Alex has encountered so far were bred to be predators.
Attempting to explain his actions, the Über-Morlock reasons that he and his people are not evil. He asks "Who are you to question eight hundred thousand years... of evolution?" He also indicates that there are other clans similar to his. The Über-Morlock then reveals the reason why Alexander cannot alter Emma's fate: he is caught in a temporal paradox.
Since Emma's death was the prime factor that drove him to build the time machine, he cannot use the machine without her death being incorporated into the timeline, as otherwise he would have had no reason to build the machine in the first place. The Über-Morlock also states that the Morlocks would not exist without those like Alexander in their quest for science and technology. Alexander learns that the Morlocks were people who chose to stay underground after the Moon collapsed and the Eloi were those who chose to brave the fallout.
His time machine has been found by the Morlocks and taken underground. To escape, Alexander jumps into the machine and sends it hurtling forward in time, taking the Über-Morlock with him. The two of them fight until Alexander pushes him outside of the time sphere. He watches as the Über-Morlock ages and dies outside of the time bubble. Alexander slows the machine as the sky appears overhead. He has traveled to the year 635,427,810 AD, and the landscape is now a desolate wasteland, completely dominated by the Morlocks.
Finally accepting that he can never save Emma, Alexander travels back in time to rescue the trapped Mara. After setting her free and before escaping, he sets the time machine to travel to the future and uses his pocket watch to jam the controls, causing it to malfunction and explode, creating a time distortion stream. Alexander and Mara escape just as the explosion kills off the Morlocks.
Trapped in the future, Alexander resolves to build a new life for himself with Mara. He begins to rebuild civilization, Vox telling the Eloi the stories in his memory. This closing scene is shown side by side with a sequence in the year 1903, where David Philby chats with Alexander's elderly housekeeper, Mrs. Watchit, before leaving and throwing away his bowler hat on the street.