In the near future, the Solar System is being struck by mysterious power surges of unknown origin, threatening the future of human life. After surviving an incident on an immense space antenna caused by one of these surges, Major Roy McBride (Brad Pitt), son of famed pioneering astronaut H. Clifford McBride (Tommy Lee Jones) is informed by U.S. Space Command (SpaceCom), the United States Armed Forces branch operating in Space, that the source of the surges has been traced to the "Lima Project" base. The Lima Project had been sent some twenty-six years prior to search for intelligent life from the farthest regions of the Solar System under Clifford McBride's leadership, and disappeared sixteen years prior in orbit around Neptune. A SpaceCom officer informs Roy that they believe Clifford may still be alive, and Roy is tasked with the mission of traveling to Mars to try and establish communication with him. Roy accepts the mission, and is joined by an old associate of his father, Colonel Pruitt (Donald Sutherland).
After taking a commercial flight to the Moon, Roy and Colonel Pruitt are escorted by US military personnel to the SpaceCom lunar base, taking them across no-man's-land. En route to the base via lunar rovers, they are ambushed by scavenging pirates, who kill most of the group except for Roy and Pruitt. After reaching the base, a dying Pruitt is placed into intensive care. Roy transfers to a SpaceCom flight, crewed by four SpaceCom officers, whom make up of Captain Lawrence Tanner (Donnie Keshawarz), Donald Stanford (Loren Dean), Franklin Yoshida (Bobby Nish), and Lorraine Deavers (Kimberly Elise). The crew aboard the Cepheus then flies to Mars.
During the journey to Mars, the ship receives a distress signal from a Norwegian bio medical research space station. Boarding the space station, Roy and the ship's captain find it abandoned, only to be attacked by an aggressive baboon escaped from the Norwegian station. The ape kills Captain Tanner before being neutralized by Roy. Another baboon attacks Roy but he is able to escape the station with the captain's body.
While making a routine landing on Mars, another power surge hits the ship, forcing manual intervention. The interim captain finds himself too scared to fly, leaving Roy to take the controls and land the ship safely.
Having landed on Mars, Roy is taken to the underground SpaceCom base, where he briefly meets Helen Lantos (Ruth Negga), the facility Director, and is then tasked with recording voice messages to be sent to the Lima Project, in hopes that Clifford will respond. After going off-script, the crew apparently receive a response, but Roy is abruptly taken off the mission, as his personal connection to the mission is deemed to pose a psychological risk to himself and the mission's success.
While being kept in a "comfort room", he is visited by Lantos, who reveals she is a native Martian and has only been once to Earth as a child. She also reveals that she is the daughter of Lima Project crew-members. In a secret conversation, she shows Roy classified footage from the Lima Project, revealing that Clifford's crew mutinied against him trying to return back to Earth, leading him to kill them all by turning off their life-support systems, and that her parents were among the crew killed. She also tells him that the crew that brought him to Mars are soon heading to the Lima Project base themselves, where they intend to destroy it with a nuclear payload. The two decide that Roy is the only person who should confront Clifford, and Helen sneaks Roy out of the base, leading him to an underground lake beneath the rocket launch site.
As the rocket takes off, Roy climbs aboard, and after being discovered, the crew is instructed to neutralize him. The ensuing altercation results, despite Roy's best efforts, in the death of the entire crew. Now alone, Roy takes command of the ship. During the long journey to Neptune, he reflects on his relationship with his father, as well as that of his estranged wife, Eve. The isolation and stress of the mission take a toll on his mental condition, but after several weeks he arrives at the Lima Project.
While approaching the base in a small module, another surge strikes, damaging the module and forcing Roy to enter the base through a space-walk. Finding the Lima base nearly abandoned and most of its crew dead, he plants the nuclear payload and meets his father. Clifford McBride, now the sole survivor of the base, explains to his son that the cause of the surges is the ship's malfunctioning anti-matter power source, which was damaged during a mutiny, and which he has been unable to solve. Clifford also reveals that he has continued to work on the project all these years, refusing to lose faith in the possibility of non-human intelligent life.
Despite his father's protests, Roy arms the payload and prepares to return to his ship with Clifford, who ultimately resorts to using the thrusters on his spacesuit to launch himself into deep space, refusing to go back to Earth. Roy tries to save him, but Clifford refuses the help, leaving a distraught Roy to watch as his father drifts away in Neptune's orbit. Alone, Roy manages to thrust himself back onto his ship, going through Neptune's ring using a piece of the Lima Project ship's hull to shield himself, while also bringing along with him the data retrieved from the base. Not having enough fuel to return on his own power, he uses the shock-wave from the nuclear explosion to propel the ship home.
Finding that the Lima Project data strongly suggests that humans are the only intelligent life in the universe, Roy finds himself imbued with a renewed desire to reconnect with those closest to him, and returns to Earth with a new-found sense of optimism. He seemingly reconnects with his wife.