In 2199, after five years of attacks by an alien race known as the Gamilas which rendered the surface of the Earth uninhabitable and forcing humanity to evacuate underground, the Earth Defense Force launches a counter-attack near Mars. The fleet's weapons are no match for the Gamilas, who easily wipe out much of the defense force. During the battle, Captain Mamoru Kodai uses his damaged ship, the destroyer Yukikaze, as a shield to cover Captain Juzo Okita's battleship allowing his escape. Mamoru's ship is destroyed.
On Earth, Mamoru's brother Susumu is scavenging on the irradiated surface near the half-buried wreckage of the battleship Yamato, when an object hits near him and knocks him unconscious. He awakens to find an alien message capsule, and notices that the radiation has been reduced to safe levels around him. He is rescued by Okita's returning ship and it is discovered that the capsule contains engineering schematics for a new warp drive and coordinates for the planet from which it came (Iskandar). After learning what happened at Mars, Susumu accuses Okita of using his brother as a living shield and tries to hit him, but crew member Yuki Mori violently stops him.
The radiation that covers the Earth's surface is slowly sinking into the ground, scientists predict that the human race will become extinct in one year. Okita believes the hope for humanity lies within Iskandar. A request for volunteers for the mission is sent out, saying that Iskandar possesses a device that can remove the effects of the radiation. Kodai - a former EDF aviator - decides to reenlist. Their last battleship, the long-dead Yamato, is rebuilt and enhanced with alien technology. Before the Yamato can launch, the Gamilas attack with a gigantic missile. Captain Okita gives the order to fire the yet-untested Wave Motion Cannon, which successfully destroys the incoming missile. Kodai is reunited with his old fighter squadron. Yuki, who joined the EDF years ago on account of her admiration for Kodai, is bitter towards him.
The Yamato crew performs their first warp test and encounters more Gamilas warships. Since the Wave Motion Cannon is powered by the same reactor as the warp drive, the crew has to wait until the engine is recharged before they can warp again. The Yamato destroys the alien capitol ships, but the battle damages Yuki's fighter. Kodai launches to rescue her and is sent to the brig for disobeying orders. Kodai's former squadmate and the acting navigator, Daisuke Shima, informs Yuki that Kodai left the service because he accidentally caused the deaths of his own parents and also nearly Shima's pregnant wife during a mission.
After warping out of the Milky Way galaxy, the Yamato crew finds a Gamilas fighter adrift and recovers it to study. At the same time, Captain Okita goes into cardiac arrest and is revealed to have a terminal disease. However, the alien pilot is still alive and possesses Space Commando leader Hajime Saito, in order to communicate. The alien calls himself Desslar and says the Gamilas are a race with a hive mind. Kodai stuns the possessed Saito and the alien apparently is destroyed.
Later, the ailing Captain Okita makes Kodai acting-captain. He also reveals that the capsule contained only the plans for the Wave Motion Engine and the coordinates to Iskandar, and the idea that the device was made to give humanity hope. The crew discovers the captured Gamilas fighter contains a homing beacon, giving away their position. The Yamato fires her Wave Motion Cannon to destroy a Gamilas warship, but a Gamilas spacecraft latches onto the ship's third bridge on the bottom of the hull. Kodai reluctantly orders Yuki, in her fighter, to blast the third bridge support away moments before it detonates, saving the Yamato but killing several crew. Kodai apologizes to Yuki for ordering her to doom their crewmates, and they comforted each other in romantic passion.
The Yamato arrives at Iskandar, but is met by a massive Gamilas fleet that sends a spacecraft to obstruct the muzzle of the Wave Motion Cannon. With their main weapon disabled, Kodai makes the dangerous choice to conduct a random warp and ends up on the opposite side of Iskandar. They are surprised to see that it is lifeless, and in fact strongly resembles Earth in its presently irradiated state. It is then discovered that Gamilas and Iskandar are the same planet. The crew thinks it is a trap, but Kodai urges them to go ahead. He leads an attack party on the planet's surface against heavy Gamilas opposition. Much of the assault force is killed, and the remaining pilots remain behind to cover for Kodai, Sanada, Saito and Mori as they head for the coordinates.
Once they reach the coordinates, an alien possesses Yuki's body and explains that Gamilas and Iskandar are two aspects of the same race. The alien says their planet is dying and they saw Earth as the most suitable replacement, after first destroying humanity. Iskandar did not agree with this and was imprisoned, she implants Yuki the ability to clean the radiation from Earth. As Yuki and Kodai return to the Yamato, Saito and Sanada sacrifice themselves by destroying the Gamilas power source, destroying most of the Gamilas forces. The Yamato returns to Earth and Okita dies. The crew rejoices their return home, but a surviving Gamilas warship ambushes them and severely damages the battleship.
Desslar now appears and says they no longer wish to invade the Earth; however, since the majority of the Gamilas were killed, he intends to destroy the planet with his ship to avenge his race. Kodai orders the surviving crew to abandon ship before he pilots the Yamato on a kamikaze attack against Desslar's ship. He fires the Wave Motion Cannon which destroys both spaceships. Several years later, the Earth's surface has been restored to its original state and Yuki is seen with her child (possibly Kodai's child).