Sixty-five million years ago, an alien race known as the “Creators” invade prehistoric Earth, using devices called Seeds to terraform the planet, covering it with an alloy called Transformium, effectively wiping out the dinosaurs. In the present day, geologist Darcy Tirrel excavates the Transformium for K.S.I. Industries, who use the extracted alloy to create man-made artificial Transformers.
It’s been five years since Battle of Chicago took place, and the people have started to view the Transformers as public enemies and traitors. Though the public believes that the Autobots were granted asylum, they are in fact hunted down by a rogue CIA black ops division, Cemetery Wind, led by paranoid government official Harold Attinger, who believes that all Transformers should be exterminated regardless of their faction. He is aided by James Savoy, a ruthless CIA agent working as his right-hand man, who despises the Autobots after losing his sister during the Battle of Chicago. Unbeknownst to everyone, Lockdown, a Cybertronian bounty hunter working for the Creators is helping the team in their operations, promising to give Attinger a Seed if his division manages to capture Optimus Prime. Lockdown loses track of Optimus in Mexico City, instead killing Ratchet when he refuses to give up his leader’s whereabouts.
Optimus, damaged in Mexico City and disguised as a rundown semi-truck, is discovered by Cade Yeager, a financially struggling Texan inventor. While his teenage daughter Tessa and business partner Lucas Flannery encourage him to turn Optimus over to the authorities, Cade instead repairs Optimus, hoping to understand more about his technology. Lucas calls Cemetery Wind who attacks the Yeager farm, but Optimus, and Tessa’s secret boyfriend, Irish rally car driver Shane Dyson, come to the family’s aid. During the pursuit, Lucas is killed by one of Lockdown’s grenades leaving Cade and Tessa devastated by the loss of there friend. Optimus summons the surviving Autobots – Bumblebee, Hound, Drift, and Crosshairs – who have come to distrust humans. Using a CIA drone he stole during the home invasion, Optimus and the Autobots learn the Deaths of Ratchet and Leadfoot and Cade discovers K.S.I.’s involvement in the attacks on the Autobots.
Infiltrating KSI’s headquarters in Chicago, Cade discovers the murdered Autobots are being melted down to be used for making the Transformer drones. Joshua Joyce, the ambitious company CEO, is in league with Attinger to revolutionize global defenses and improve human society using the Seed. He has also used the captured Brains and Megatron’s head to create prototype Transformer soldiers Galvatron and Stinger. However, instead of resembling Optimus Prime, the finished Galvatron resembles Megatron and Sentinel Prime heavily, much to Joshua’s annoyance. The Autobots storm the building and destroy the laboratory, but they soon leave after Joshua announces that they are no longer required. Attinger forces Joshua to deploy Galvatron and Stinger to capture the Autobots. During the battle, Galvatron’s behavior becomes slightly erratic when it starts destroying vehicles, but Joshua manages to redirect it to target the Autobots. As Galvatron battles Optimus, it gets autonomously freed from control, surprising Joshua. Suddenly, Lockdown arrives and soon abducts both Optimus and Tessa, leaving Cade and Shane devastated.