The Transformers: The Movie (1986)
In 2005, the war between the Autobots and Decepticons has culminated in the Decepticons conquering their home planet Cybertron, while the Autobots operate from its two moons preparing a counter-offensive. Optimus Prime sends an Autobot shuttle to Earth's Autobot City for Energon supplies, but the Decepticons, led by Megatron, commandeer the ship and kill the crew, consisting of Ironhide, Ratchet, Prowl and Brawn. Travelling to Earth, the Decepticons attack Autobot City, slaughtering many Autobots and leaving only a small group alive including Hot Rod, Kup, Ultra Magnus, Arcee, Springer, Blurr, Perceptor, Blaster, and the human Daniel Witwicky. The next day, Optimus and the Dinobots arrive as reinforcements. Optimus single-handedly defeats the Decepticons and engages Megatron in a climactic battle that leaves both of them mortally wounded. On his deathbed, Optimus passes the Matrix of Leadership to Ultra Magnus, informing him that its power will light the Autobots' darkest hour, and dies.
Elsewhere, the Decepticons jettison their wounded from Astrotrain, including Megatron at the hands of his treacherous second-in-command Starscream. The wounded are found by Unicron, a gigantic sentient cyber-planet who consumes other planets. Unicron offers Megatron a new body in exchange for destroying the Matrix, which has the ability to destroy him. Megatron reluctantly agrees and is converted into Galvatron, while the corpses of the Decepticons jettisoned along with him are used to create his new troops. Going to Cybertron, Galvatron crashes Starscream's coronation as Decepticon commander and destroys him, before travelling to Autobot City to eliminate Ultra Magnus. The surviving Autobots escape in separate shuttles, which are damaged by the Decepticons and crash land on different planets.
Hot Rod and Kup are taken prisoner by the Quintessons, multi-faced tyrants who hold kangaroo courts and execute prisoners by feeding them to the Sharkticons. Hot Rod and Kup learn of Unicron from Kranix, a survivor of Lithone – a planet devoured by Unicron. After Kranix is executed, Hot Rod and Kup escape their own trial, aided by the arrival of the Dinobots and the small Autobot Wheelie, who helps them find a ship to leave the planet. The other Autobots land on the Junk Planet, where Galvatron kills Ultra Magnus and seizes the Matrix, intending on using it to control Unicron. The Autobots reunite and befriend the local Junkions, led by Wreck-Gar, who then rebuild Magnus. Learning Galvatron has the Matrix, the Autobots and Junkions fly to Cybertron, which Unicron, discovered to be a gigantic Transformer also now in robot form, begins to destroy.
The Autobots crash their spaceship through Unicron's eye, but they end up separated. Daniel rescues his father Spike and Jazz, Bumblebee, and Cliffjumper from being devoured. Hot Rod confronts Galvatron, who tries to form an alliance, but is forced into attacking Hot Rod by Unicron. Hot Rod obtains the Matrix, which converts him into Rodimus Prime, the Autobot that Optimus said would light their darkest hour. Rodimus tosses Galvatron into space and uses the Matrix's power to destroy Unicron from the inside. The Autobots celebrate the war's end and Cybertron's retaking, while Unicron's severed - and slowly regenerating - head orbits Cybertron.
Reference:
https://en.wikipedia.org/wiki/The_Transformers:_The_Movie
*All Images/Gifs taken from Google Images*