Transformers 2: The Coming of Unicron is the sequel to the 2007 film Transformers. It features the return of the stars from the original.
After the battle in Los Angeles the autobots have been hiding on Earth.
They find out that five mechanical dinosaurs are found in Mexico. Sam Witwicki tells Optimus this. Optimus and Ironhide go to Mexico to bring them back and find Starscream with a new group of Decepticons there for an unknown reason. There is a battle, but Optimus and Ironhide are forced to flee on a ship provided by the United States that they took to get there.
Ratchet had been working on Jazz to see if he could repair him and eventually does. Everyone is happy Jazz is revived and Ratchet begins to work on the Dinobots to revive them from their coma. The Autobots Red Alert, Hot Rod, and Acree arrive on Earth. The find the others and Red Alert helps Ratchet with the Dinobots. Acree becomes Mikaela's motorcycle.
Meanwhile it is revealed that Starscream was in Mexico to get the Constructicons. A group of Decepticons sent by Megatron to destroy the Dinobots. Though they were put into a coma when the meteor that wiped out he dinosaurs hit Earth.
Eventually the Decepticons attack Chicago to draw out the Autobots. Eventually they are defeated by the Autobots, and are forced to flee.
Back at their base Thrust tells Starscream that he is unable to lead, and that they need to bring back Megatron. Using Galvatron (who changes into an aircraft carrier) they go out to sea. They eventually pull Megatron out of the Ocean and revive him with a synthetic spark. Megatron is reborn and seeks revenge on Optimus Prime and the rest of the Autobots.
Sam begins having trouble with Mikaela when he meets Carly. Bumblebee also falls in love with Acree.
The Decepticons attack the Pentagon to wipe the U.S.A.'s military hardrive to cripple the U.S. military. The Autobots battle the Decepticons, and to their surprise see Megatron alive. Jazz sees him and attacks him in a blind rage for revenge for his death, though Megatron defeats him. Eventually Lazerbeak wipes the hardrive, and the Decepticons flee on their ship the Nemesis.
Back at the Autobot base Jazz is enraged and vows to kill Megatron no matter what. Optimus tries to help him but Jazz leaves to hunt down Megatron on his own.
Starscream has his own vendetta against Megatron for taking power from him again. He plans to betray him and take over the Decepticons once more. Meanwhile Thrust finds out that there is a high energy source heading towards Earth. Megatron sees the power reading and can't believe his eyes. He realizes that the warlord from Cybertron named Unicron is heading towards Earth. When asked by Starscream about what he is going to do Megatron shouts that he doesn't know.
Mikaela breaks up with Sam becuase she thinks Sam likes Carly despite what Sam says against it.
Thrust tells Megatron that they should leave Earth before Unicron arrives but Megatron says that he is not leaving till the Autobots are destroyed.
Sam sits with Bumblebee mourning over losing Mikaela. Hot Rod drives to them, transforms into his robot form and challenges Bumblebee to a race. Bumblebee tells Sam that they can win, and that it will help him get his mind off of Mikaela.
Bublebee and Hot Rod have a long race when a missille creates an explosion knocking down Bumblebee and Hot Rod. They are surrounded by Starscream, Thrust, and the Constructicons. Bumblebee and Hot Rod try to fight them but they fail. When Hot Rod is knocked out by the Constructicons, Bumblebee helps Sam escape, but is then knocked out by Starscream. Starscream tells the Constructicons to take Bumblebee and Hot Rod to the Nemesis.
Back at the Autobot base Grimlock finds out about a high energy source heading towards Earth. He tells Optimus when Sam burst into the base shouting about how Bumblebee and Hot Rod had been kidnapped by the Decepticons. Optimus then explains the story of Unicron. That he is a powerful warlord who sought to take over Cybertron. The king of Cybertron (Optimus and Megatron's father) battled and nearly killed Unicron. He also somehow escaped from Cybertron before it was wiped out.
Megatron interrogates Hot Rod about the location of the Autobots. Hot Rod refuses, and Megatron kills him for it.
In New York city Megatron proclaims that he challenges the Autobots to a final battle, or they will kill Bumblebee. The Autobots answer his challenge, and go to fight the Decepticons. The Constructicons combine together for the fight. During the fight Thrust stands with Megatron from a rooftop watching the battle when Starscream blows Thrust away with a hail of missilles killing him. Megatron turns into his ship form, and gets out of the way of another hail of missilles shot by Starscream at him. Megatron swings around, and shifts back into his robot mode on the rooftop calling Starscream a traitor. The two fight in both of their modes. While at a point when they are both jets Megatron blasts Starscream, who crashes to his death into the Empire State Building. Megatron turns away from the Empire State Building saying, "Good bye my son." Jazz jumps onto the roof and punches Megatron in the back saying, "That will be your last victory." Megatron falls off of the building. Jazz jumps down, and Megatron gets up. The two have a fight but Megatron has the upper hand. When he has Jazz down Optimus Prime attacks Megatron and they have a fight. Eventually Megatron prepares to shoot a huge powerful beam at Optimus. Right when Megatron fires it Jazz jumps in the way. Optimus enraged rushes at Megatron and the battle continues. Eventually a fleet of ships can be see approaching. The ships of Unicron's fleet! Megatron and the Decepticons rush to the Nemesis, and fly into space towards Unicron (who changes into a spaceship battle cruister rather than a planet).
Megatron walks out onto the ramp and proclaims his alleigance to Unicron. Unicron accepts the service of the Decepticons.
The Autobots help the civilians escape to safety, and return to their base with the liberated Bumblebee.
Optimus records in his voice journal about the recent events and states, "The war for Earth begins."
Transformer 2: The Coming of Unicron is followed by Transformers 3: The War for Earth where the world is at war with the forces of Unicron and the Decepticons, picking up where the second movie leaves off.