In the near future, Lunar Industries has made a fortune after an oil crisis by building Sarang Station, a facility on the far side of the Moon to mine the alternative fuel helium-3 from lunar soil, which is rich in the material. The facility is highly automated, requiring only a single human to maintain operations, oversee the harvesters, and launch canisters bound for Earth containing the extracted helium-3. Sam Bell nears the end of his three-year work contract at Sarang Station. Chronic communication problems have disabled his live feed from Earth and limit him to occasional recorded messages from his wife Tess, who was pregnant with their daughter Eve when he left. His only companion is an artificial intelligence named GERTY, who assists with the base’s automation and provides comfort for him.
Two weeks before his return to Earth, Sam begins to suffer from hallucinations of a teenage girl and a bearded, disheveled man. One such image distracts him while out recovering a helium-3 canister from a harvester, causing him to crash his lunar rover into the harvester. Rapidly losing cabin air from the crash, Sam falls unconscious.
Sam awakes in the base infirmary with no memory of the accident. He overhears GERTY having what appears to be a live chat with Lunar Industries management. Lunar Industries then orders Sam to remain on base and informs him that a rescue team will arrive to repair the harvester. Suspicious, Sam manufactures a fake problem to persuade GERTY to let him outside. He travels to the crashed rover, where he finds his unconscious doppelgänger. He brings the double back to the base and tends to his injuries. The two Sams start to wonder if one is a clone of the other. After a heated argument and physical altercation, GERTY reveals that they are both clones of the original Sam Bell. GERTY activated the newest clone after the rover crash and convinced him that he was at the beginning of his three-year contract. GERTY confirms his memories of his wife and daughter are implanted.
The two Sams search the area, finding a communications substation beyond the facility’s perimeter which has been interfering with the live feed from Earth. GERTY helps the older Sam access the recorded logs of past Sam clones, showing them all falling ill as their contract expires. Later, the older Sam discovers a secret vault containing hundreds of hibernating clones. They determine that Lunar Industries is unethically using clones of the original Sam Bell to avoid the cost of training and transporting new astronauts, as well as deliberately jamming the live feed in order to prevent the clones from contacting Earth; clones who believe they’re entering the final hibernation at the end of their contract just before their final return to Earth are in fact incinerated. The older Sam clone drives past the interference radius in a second rover and tries to call Tess on Earth. He instead makes contact with Eve, now 15 years old, who says Tess died “some years ago”. He hangs up when Eve tells her father (offscreen, identified as “Original Sam” in closed captioning) that someone is calling regarding Tess. After he returns, the older Sam begins displaying the same symptoms as previous clones as they begin to deteriorate.
The two Sams realize that the incoming rescue team will kill them both if they are found together. The newer Sam convinces GERTY to wake another clone, planning to leave the awakened clone in the crashed rover and send the older Sam to Earth in one of the helium-3 transports. But the older Sam, having learned that the clones are designed to break down at the end of the 3-year contract, knows that he will not live much longer. With his health rapidly declining, the older Sam suggests that he be placed back into the crashed rover to die so Lunar Industries will not suspect anything, while the newer Sam escapes instead.
Following GERTY’s advice, the newer Sam reboots GERTY to wipe its records of the events. Before leaving, the newer clone reprograms a harvester to crash and wreck the jamming antenna, thereby enabling live communications with Earth; he also brings along a canister of helium-3 to provide him with funds once he reaches Earth. The older Sam, back in the crippled rover, remains conscious long enough to watch the launch of the transport carrying the newer Sam to Earth. The rescue team is successfully fooled after finding both a newly-awakened clone in the medical bay and the corpse of the older Sam inside the crashed rover.
The helium transport arrives at Earth, and over the film’s credits, news reports describe how Sam’s testimony on Lunar Industries’ activities has stirred up an enormous controversy, and the company’s unethical practices have caused their stock to plummet.