In the year 2077, Jack Harper (Tom Cruise) is a drone technician living in a tower high above the clouds with his assigned partner Victoria/Vika (Andrea Riseborough). They are the last people left on Earth after it was destroyed by aliens known as the Scavengers/'Scavs', who wanted Earth's resources. The Scavs destroyed Earth's moon for material resources, which caused a series of natural disasters and global devastation, then they invaded. In the ensuing war, humans were forced to use nuclear weapons. In the end, humans won the war but lost the Earth by turning most of it into a radioactive wasteland. The entire remaining human population moved to Titan, one of the moons of Saturn, with a select number inhabiting a large spaceship in orbit around Earth called the Tet. Giant machines are drawing up seawater to extract energy for humanity's new home.
Jack's job is to journey to the surface during the day to repair the drones. These are spherical, flying robots designed to detect and terminate remaining Scavs on Earth. Vika's job is to stay inside the Tower to keep an eye on him as his coordinator and to correspond with and get their mission objectives from Sally (Melissa Leo), the mission commander on the Tet.
Jack repairs drones within an area containing what looks like the remains of New York/Manhattan. He repairs drone #166 one day in the Superbowl Stadium and reminds Vika that he would love to have watched the last game in 2017. He encounters a dog and is able to send it away before Drone #166 fully recovers and kills it. He then goes on to find another lost drone inside the New York Public Library, but it is revealed to be a trap set up by the Scavs. Luckily, the drone from earlier, #166, saves Jack from this encounter. The drones have incredible fire-power and maneuverability. Jack finds a book and decides to take it home. He remembers a verse inside it about Horatius.
Jack returns to the Tower for the night again and has dinner with Vika. She is excited that they are only two weeks away from completing their mission and will soon be on their way to join the rest of humanity on Titan. Jack, however, is unsure - he doesn't want to leave yet. He has been getting flashbacks and having dreams of a time before 'the war' though he knows these can't be real as he was given an obligatory memory wipe before starting his mission as 'the mop-up crew'. Jack gifts Vika some flowers he has been tending, but she discards them by dropping them from the Tower because it goes against regulations and they could contain "thousands of toxins". They later go for a swim, and during a kiss, Jack has another flashback of a particular woman. In the morning, the two awake to a mushroom cloud explosion in the distance - one of the water processing machines has exploded.
The next day, Jack goes back to work and is instructed to investigate a beacon signal from the bombed-out Empire State building. They discover the signal is coded coordinates. Believing it to be the work of the Scavs, he cuts the wire. He then tells Vika that he'll perform a perimeter check around the border where the 'radiation zone' meets the safe area, but really he is visiting his secret house by a lake, in a lush green valley hidden away from view. He falls asleep on the grass and awakes to see objects parachuting down from the sky. They crash land right on the coordinates from the transmission. He flies to investigate and finds humans in delta-sleep pods scattered about the wreck. Drones arrive and begin destroying all of the pods. He discovers one of the pods contains the woman from his flashback dreams and is able to save her by using himself as a shield (the drones are programmed to not terminate Jack). He takes the pod back up to the Tower, where Vika manages to wake the woman from deep sleep. We find out her name is Julia (Olga Kurylenko). Vika is not happy at having her stay with them, and against Jack's wishes, she reports Julia's presence to Sally, who requests Jack take Julia up to the Tet.
At sunrise Julia encourages Jack to go with her to collect the data recorder from her crashed spaceship; she needs to know what happened. He takes her, without Vika knowing. After they retrieve it, Jack realizes they are surrounded by Scavs. He sends the aircraft back on autopilot emergency return just before being knocked unconscious by a Scav and transported to their home base.
Jack awakens to find himself captured and tied to a chair. The Scavs reveal themselves to be human, not the alien species that invaded Earth. They tell Jack the real aliens are inside the Tet, and the drones are actually programmed to kill any remaining humans. The leader of the Scav/Human resistance, Beech (Morgan Freeman), asks Jack for his help. They have a stolen drone along with ten power cells from other drones they have brought down, and they have scavenged the weapons-grade plutonium power core from the wrecked ship Julia was on. This has allowed them to turn the stolen drone into a nuclear bomb that can destroy the Tet. They hope that Jack, as a skilled drone technician, will help them reprogram the drone. He refuses, still believing there are humans on board the Tet. Beech releases them and tells Jack that if he is looking for the truth, he will find it in the forbidden 'radiation zone.'
The two ride Jack's motorbike until it runs out of fuel, then hike to the Empire State building where Jack manages to send a signal to Vika. She sends the aircraft to pick them up. On the balcony viewing area, Julia tells Jack who she really is. They were both from the spacecraft Odyssey, and she is his real wife, before he had his memory erased. He remembers, and they share an embrace just as the aircraft arrives. Vika sees this. Jack and Julia go back to the Tower, where an upset and jealous Vika sends a message to Sally saying she and Jack are no longer an "effective team." A damaged drone Jack has stored for repairs on a lower floor of the Tower activates to terminate the failed maintenance team. Vika is vaporized, but just before it kills Jack, Julia shoots it with the aircraft gun.
Jack and Julia fly away and are soon being chased by three other drones. In an attempt to destroy them, they fly into a lightning storm and then into a canyon. Jack manages to destroy two but the third, #166, rams them, and they crash into a sandy desert in the radiation zone. Jack realizes that he is not boiling alive as he was led to believe would happen if he ventured into the radiation zone. He also hears the familiar distress beep of a broken drone just over the next sand dune. Upon investigating, Jack witnesses another technician in an identical aircraft land to fix the drone, despite his being told there were no other people on Earth.
Jack confronts the technician and is shocked to see himself - it is a clone known as Jack Harper 52. They get into a fight, and during the brawl, Julia is shot in the abdomen. Jack uses 52's plane to go to 52's Tower and collect a med-kit for Julia, and there he sees another Vika. He is stunned by the elaborate unraveling of everything he knew to be true but manages to trick this Vika into believing he is her Jack.
After saving Julia, they take refuge in the lake house, and re-connect. Jack decides to help the human resistance and returns to assist in programming the drone. However, during this time, Sally has sent another three drones after Jack. By following his DNA trail, the drones arrive at the Scavs' home base and attack all of the humans, leaving few survivors. Beech is mortally wounded, and the captured drone is no longer functional. The fuel cells remain intact, though, and they decide the only way they can still transport the bomb into the Tet is by hiding it in a delta-sleep pod with Julia, bringing her to the Tet as Sally had requested (to make a "more effective team").
Jack flies to the Tet with the delta-sleep pod. On the way, he listens to the data recorder recovered from the Odyssey. Jack hears himself as the Odyssey pilot approaching the Tet in the 2017 first contact, the day after the Superbowl. Vika is co-pilot and Julia is one of the crew members in hibernation. They were being guided by the real Sally, a NASA cap com. The Odyssey began to accelerate uncontrollably towards the Tet, and in order to save the crew and Julia, Jack released the back shuttle with the delta-sleep pods, leaving only him and Vika heading towards the Tet.
Jack (Tech 49), now at the Tet, is allowed entry. The alien (Sally) is suspicious and questions Jack's motives for coming. It nearly destroys him after physiological signs of lying are detected, but he tricks it by truthfully stating he wants the human race to survive, and this (being willing servants, ostensibly, but really he means the Tet's destruction) is the only way. He is allowed to proceed further inside to deliver Julia. Along the way he sees a multitude of clones of himself and Vika growing in pods. In the alien's presence (revealed to be a large floating pyramidal object with a red laser eye in the center), Jack opens the delta-sleep pod. Inside is not Julia but the wounded Beech. Realizing the deception, the alien summons drones to destroy them and pleads "I created you, Jack, I am your God," but together Jack and Beech detonate the fuel cells.
Julia wakes up by the lake house. Sitting up in the sleeper pod, she witnesses the Tet explode spectacularly in the sky and weeps.
Three years later, Julia is living in the lake house with her daughter. She and little girl see members of the human resistance. A figure then walks out of the crowd, Jack Harper 52. The movie ends before we know more about Jack 52 or what his relationship is or will become with Julia.