In 1958, two U.S. Air Force pilots and aspiring astronauts, William “Hawk” Hawkins (Tommy Lee Jones) and Frank Corvin (Clint Eastwood), are testing a modified Bell X-2 when Hawk decides to break a height record. The plane stalls and they are forced to eject and then freefall to lower altitude, narrowly missing a Boeing B-50 Superfortress flying with navigator “Tank” Sullivan (James Garner) as they parachute to safety. On the ground, Frank punches Hawk for putting their lives at risk, but their fight is broken up by flight engineer Jerry O’Neill (Donald Sutherland). Their supervising officer, Bob Gerson (James Cromwell), chastises Hawk for his recklessness, before taking them to a press conference, where it is announced that the Air Force will no longer be involved in space flight tests as this has now been handed off to the newly created NASA, ending the four’s dreams of reaching space.
In the present day, NASA is tasked to prevent a Soviet communications satellite, IKON, from decaying out of orbit and crashing to Earth. The design of the satellite’s electronics is archaic and based on those of Skylab that Frank had developed. Bob, now a project manager at NASA, sends NASA engineer Sara Holland (Marcia Gay Harden) to request Frank’s help. Frank is initially hostile as he still despises Bob, but agrees to put aside his differences to help with the current situation. However, Frank insists that he have the help of his “Team Daedalus” including Hawk, Tank, and Jerry. Bob agrees to this, though discreetly plans to have younger astronauts shadow the four and learn from them so as to replace Frank’s team before launch. When the press learn of Frank’s team, however, the Vice President convinces Bob that Frank’s team must be part of the mission for good publicity. The old and young teams, though initially competitive, soon work together, with the older astronauts showing off skills learned without the aid of a computer. As they train and undergo examinations, Hawk is found to have pancreatic cancer and given only eight months to live, but is still considered flight-worthy.
The Space Shuttle Daedalus successfully launches into orbit. They find the satellite but all agree it looks nothing like a communication satellite. They secure the satellite with the shuttle’s loading arm and begin repairs, but soon find it houses six nuclear missiles, relics from the Cold War and a violation of the Outer Space Treaty. The mission is quickly put under secrecy. Frank discovers that the control system for the satellite originated from Bob’s own files and was stolen by the KGB, and that the satellite’s computers will launch the missiles at predetermined targets if the satellite falls out of orbit. NASA and the crew devise a plan to use the payload-assist rockets to push the satellite out of orbit and into deep space. However, as they prepare for this maneuver, one of the younger astronauts, Ethan Glance (Loren Dean), acting under Bob’s original orders, tries to put the satellite into stable orbit himself, which is mistimed and sets off a chain reaction: the satellite collides with the shuttle, damaging most of the shuttle’s computer systems and engines, destroying the solar panels on the satellite, and sending it faster into a decay orbit, while Ethan is knocked out and dragged along with the satellite.
While Tank and Jerry tend to the other young astronaut Roger Hines (Courtney B. Vance), who suffered a concussion on the impact, Frank and Hawk make a space walk and reach the satellite in time to activate a booster rocket and slow down the orbit. As they see to Ethan, the two realize that there is no way to restabilize the orbit of the satellite without power, and the only option is to have someone ride on the satellite as they fire the missiles’ engines so that it falls into deep space. Hawk quickly volunteers to sacrifice himself, hoping that he will be able to land himself on the Moon to fulfill his life’s dream. After helping Hawk to rig the satellite for launch, Frank takes Ethan back to the shuttle to be tended to. Frank, Tank, and Jerry say their goodbyes to Hawk as he engages the rockets, successfully propelling the missiles away from Earth.
Frank, Tank, and Jerry now work to bring the shuttle back to Earth, with the plan to achieve a low enough altitude to allow the shuttle to be evacuated over water since landing it would be difficult. Frank successfully pilots the Space Shuttle to reenter orbit but with too fast a speed. After safely bailing out Ethan and Roger, Tank and Jerry stay with Frank regardless of the risk. Frank recalls a maneuver Hawk had used before, purposely stalling the shuttle to drop its speed quickly and allowing him to land the shuttle safely. The crew is welcomed back as heroes.
Later, Frank talks with his wife Barbara and contemplates if Hawk made it to the Moon. The film ends with the Frank Sinatra song “Fly Me to the Moon”, zooming in on the surface of the Moon showing that Hawk had indeed arrived, having died while peacefully watching the Earth.