The film starts on July 20, 1969, in the home of astronaut Jim Lovell (Tom Hanks). Jim and a number of other NASA families are gathered to watch the moon walk by Apollo 11's astronauts. Later on, Jim contemplates how close he came to the moon when he was orbiting it on Apollo 8, and thinks about one day setting foot on the moon, as his wife Marilyn (Kathleen Quinlan) tries to keep from thinking of her husband going off on another mission.
Some months later, Jim is informed that due to an ear-infection by one of the Apollo 13 crew, he and his crew members have been bumped up to become the Prime Crew for the mission. Marilyn has some misgivings, given the shortened schedule (and that the mission number is 13), but Jim is confident they'll be ready.
Jim works with his crew members Fred Haise (Bill Paxton) and Ken Mattingly (Gary Sinise), and the three seem well prepared for their mission. It is shortly before the launch, that Marilyn hints to Jim about her misgivings about the flight, but Jim assures her she's going to miss a great show.
After their discussion, Jim and his crew members attend a small press conference, where they discuss the different ways that the number '13' has worked into the launch (Apollo 13, launching at 1300 hours and 13 minutes, and orbiting the moon on April 13th). Jim also surprises the press and the crew, when he declares that the mission will also be his last.
With days before the mission, the Flight Surgeon reveals that one of the backups has the measles, and the crew has been exposed to it. The Flight Surgeon feels that since Ken Mattingly has not had the measles before, he is in serious risk of becoming sick during the mission. Jim is then given a choice: he can have Ken Mattingly replaced with his backup, Jack Swigert (Kevin Bacon), or the Apollo 13 crew as a whole can be pushed back to a later mission. Though he is upset by the choices, Jim chooses to replace Ken.
The crew continues to train in the simulator, though they are not as confident in Jack's piloting skills as Ken's. Even so, Jim promises they'll be ready for the launch.
On the day of the launch, Ken watches from a distance, as the rocket takes off, with Marilyn Lovell and Fred Haise's wife Mary (Tracy Reiner) in attendance near the launch site.
Eventually, the crew are able to successfully dock the Command Module with the LEM (Lunar Excursion Module), Swigert's piloting skills be up to the task, and the mission continues toward the Moon. The crew also broadcasts a video of being inside the craft, but due to feelings that moon missions aren't exciting anymore, none of the television networks carry the transmission.
Shortly after the video feed, the crew makes some 'housekeeping procedures' on the ship, Jim Swigert is asked to stir the oxygen tanks. Suddenly, a loud bang is heard, and the ship begins to pitch out of control, with the system buttons lighting up, and the oxygen tanks beginning to fail.
Mission Control (led by Gene Kranz (Ed Harris)) springs into action, attempting to find some way to stop the leak. At the insistence of EECOM member Sy Liebergot (Clint Howard), it is suggested to shut down the fuel cells to prevent further leakage. However, this move comes at a price: with the fuel cells closed, that means the chance to land on the moon will not go through. The procedure is met with some trepidation by Jim Lovell, but the crew makes the move...only for the oxygen level in the Command Module to continue to plummet.
With 15 minutes of oxygen remaining in the Command Module, an emergency transfer is made to transfer computer information and the astronauts into the LEM, utilizing it as a lifeboat.
Eventually, the crew are secure in the LEM, and Gene Kranz and his men attempt to figure out the best way to bring the men home. While some are for a 'direct abort' (having the crew turn the ship around and head back to Earth immediately) using the Command Module, Gene says it's too risky to light its engine, as they don't know to what extent the 'explosion' that was reported has affected the craft. The plan is for the moon's gravity to slingshot the crew around, and once they come around, they'll fire up the LEM's engine to send them home. The men who designed the LEM do caution that their craft was not designed for what is being proposed, let alone holding 3 men instead of 2. Even so, Gene insists it's the only option they have that's workable.
Meanwhile, Marilyn Lovell attempts to keep herself together and be strong for her family. At one point NASA media spokesman Henry Hunt (Xander Berkeley) asks Marilyn if the news stations can set up an antenna on her front lawn. She harshly refuses, saying that they can talk to Jim himself after he comes home.
On the craft, the crew passes into the dark side of the moon, and soon passes back around. Though Haise and Swigert are excited to see their landing site below and Jim imagines his own walk on the moon's surface, Jim informs them that they still need to prepare to return home.
It is during this time, that the men at Mission Control have determined that there's only 45 hours worth of power left on the craft, which is not enough to bring them home. This information is corrected by John Young (Ben Marley), who insists that they are using more power than the calculations have estimated. John says that the crew has to shut off nearly everything, and get the use of power down to 12 Amps (aka amperes). Gene approves, but then tells the others to do further research, including simulator time to work on a re-entry procedure.
Ken Mattingly, who'd isolated himself at home and had missed all the news about the mission being crippled, is called in, and begins to do simulator work. Ken figures that if they can eliminate unneeded procedures from the checklist, he can most likely get the men back with the limited power they have. He orders the simulator team to give him the same conditions and equipment that the Odyssey crew has and begins to work long hours without any breaks to figure out a procedure.
Shortly after, a new problem is found when it is determined that all three men in the LEM is using up more oxygen and producing more carbon dioxide than expected. Fred Haise realizes that he made an error when he calculated oxygen reserves for only himself and Jim since they were going to be the only 2 using the LEM. The ground team realizes that the LEM filters are round, and the only other filters on the craft (for the Command Module) are square. A team is put together to create a filtration system from the limited supplies on the craft itself. The team works feverishly to build a new filter and succeeds in relaying the procedure to Lovell's crew and cleansing the air on the Odyssey.
When it is determined the crew needs to do a 'manual burn' to correct their trajectory back to Earth, Jim and the crew time a difficult 30-second burn using only rudimentary physics: the course computer had to be shut down to conserve battery power and they can only navigate by using one of the LEM's windows by keeping the Earth positioned in it. The burn is successful.
With their course corrected, Jim and the crew are eager for the re-entry procedure, but are told that it is still being completed. However, there is some hope when Ken Mattingly's name is mentioned. The crew are cold since the heaters had to be shut down and Haise begins to feel ill.
Ken has streamlined his work as best he can, but the procedure is still going over by 4 amps. It is then that Ken proposes that some of the excess power still in LEM can be reversed into the Command Module. Though power will be lost in the transfer, the amperage needed is found to be enough to complete the procedure without the system losing power.
Ken and his cohorts quickly rush over to Mission Control with the procedure. Ken helps guide Jack Swigert through the power-up, while Jim and Fred add ballast into the Command Module pod, which is underweight since the planned addition of moon rocks from the mission did not happen.
The crew then jettisons the lower portion of the command module. As it drifts off, the astronauts record what they see: a entire panel of the craft was blown out, and may have damaged the heat shield of the Command Module pod, creating a new potential problem that the Odyssey won't be able to survive the intense temperature of re-entry into Earth's atmosphere.
Eventually, the LEM is cut loose, and the crew prepares for re-entry. Meanwhile, around the world, numerous people wait to see if the three men will make it back. Friends and relatives of Marilyn gather at her home to watch the news coverage.
As the men begin their re-entry, contact is lost, and a countdown to 3 minutes begins (the average time it takes astronauts to emerge from 'black out'). However, after 3 minutes, no word is heard when Ken Mattingly radios the crew. The time then stretches into 4 1/2 minutes, before suddenly, Jim Lovell's voice is heard, and a video feed shows the capsule with its parachutes deployed. The men are quickly recovered, and taken aboard the USS Iwo Jima, to the cheers of numerous crew.
In a voice-over, Jim explains that their mission was called "a successful failure," in that they returned safely, but didn't make it to the moon. It is also revealed that the cause of the explosion was a damaged coil in the oxygen tank that exploded which had been determined a 'minor defect' months before Lovell was named captain of the ship.
A summary is then given of the lives of several other people:
- Fred Haise was scheduled to be on Apollo 18, but due to budget cuts, his mission never came.
- Jack Swigert left NASA and was elected to Congress for the State of Colorado, but died of cancer before taking office.
- Ken Mattingly orbited the moon as commander of Apollo 16, and flew the Space Shuttle (having never gotten the measles).
- Gene Kranz retired as head of Mission Control in the mid-90's.
As stated to the press, Jim's time aboard Apollo 13 was his last space mission. Even so, he hopes that one day, NASA will return to the moon.