After an epic battle moving from the Hoover Dam to a nearby city, resulting in the deaths of Bonecrusher (decapitated by Optimus Prime), Brawl/Devastator (taken down by Bumblebee and the military), Blackout (Taken down by Captain Lennox), Jazz (bisected by Megatron) and Frenzy (comically self decapitated), with Bumblebee incapacitated (legs blown off by Starscream's attack), Sam (Shia LaBeouf) takes the Allspark to the top of a building, where Megatron (voice of Hugo Weaving), seeking to use the Allspark to transform Earth into a technological world and rebuild his army follows him. Sam signals the military to take the Allspark from him but the military helicopter is attacked and destroyed by Starscream. Megatron then tries to attack Sam, sending him off the building to be just barely caught by Optimus Prime(voice of Peter Cullen). The three fall to the ground where Optimus charges Sam with the duty of pushing the Allspark into his spark, which would kill him but also destroy the Allspark. Optimus and Megatron engage in an all out battle to finish each other off (opening with the throwback "One shall stand, one shall fall") which ends in stalemate. Prime tells Sam to Put the Allspark into his chest, but Sam instead directs it at Megatron, and the surge of energy wipes out the allspark and kills Megatron. All of the decepticons are thrown by the military into the worlds deepest oceanic trench, so that they would stay in stasis lock forever. Bumblebee decides to stay with Sam, who ends up with Mikaela(Megan Fox). Captain Lennox(Josh Duhamel) returns home to his wife and baby daughter, and Ironhide, Ratchet and Optimus Prime stay with their human allies, and Optimus sends a message hoping to reach other surving Autobots.
After the credits start to roll, Starscream is seen escaping Earth's atmosphere. Barricade and Scorponok are not shown to die, leaving open the possibility for a sequel appearance.