A thousand years ago, King Arthur leads his knights and men into a battle they can't hope to win. Having realized this, he enlists the help of the magician Merlin, who negotiates with a Cybertronian Knight. The Knight gives Merlin a staff wielding ultimate power, and he has the gestalt Knight Dragonstorm aid Merlin. Dragonstorm comes to the knights' aid, wiping out their adversaries.
In the present day, Transformers are once more heroes on Earth. However, more Transformers have been arriving on the planet recently. The Transformers Reaction Force dedicates itself to hunting down and destroying decepticons. In an area of war-torn Chicago, a group of kids stumble upon a crashed alien ship with a Cybertronian Knight inside. The kids are confronted by a TRF Walker, which is destroyed by Izabella, a survivor of the Battle of Chicago. Izabella and her Transformer companions, Sqweeks and Canopy, urge the kids to escape, but Canopy is shot by a TRF plane drone and dies. Shortly after, Bumblebee and Cade Yeager arrive and help the kids escape. Yeager finds the dying Knight, who gives him a metallic talisman.
In the last few days, Harold attinger former leader of cemetery wind, has been reporting to soundblaster. Whom had taken a new form and revealed he had formed an alliance with a powerful alien sorceress named Quintessa creator of the transfomers. he has him release cobra commander from custody and corrupts him planning to destroy Earth, or "Unicron" the chaos bringer, so Cybertron can be restored Attinger agreed if he destroyed the autobot for good. Lennox, a former N.E.S.T. member who now works under the TRF, speaks with General Morshower, his former superior, about the presence of an ancient alien technology on Earth. This technology can help bring Cybertron into Earth's atmosphere, but only through the use of the staff given to Merlin. Soundwave than begins sending his forces go off to find Yeager.
Yeager hides out at a junkyard, which serves as a sanctuary for many of the surviving Autobots Bumblebee, Hound, Drift, Crosshairs, Grimlock, Wheelie, and many others. While there, Yeager finds that Izabella has followed him back; Yeager tells her to leave but Izabella wants to stay and fight. The Decepticons arrive at the junkyard and attack the Autobots; in the ensuing chaos, most of the attacking cons are killed except Nemesis and Barricade. Yeager is confronted by Cogman, a Headmaster, and the Autobot Hot Rod. Optimus allows him to take Cade to England and there meets with Sir Edmund Burton, the last living member of the ppm I Witwiccan Order. Burton tells Cade of the Transformers' origins, saying that the collision of Cybertron with Earth would spell certain doom. He tasks Yeager, with obtaining his staff so they can prevent an ancient evil from being awakened. Burton tells Yeager that, as a person defined by honor and dignity, he is the last knight. The talisman given to Yeager has wrapped around his arm by this point. The trio are forced to evacuate Burton's home when the mercenaries arrives.
With cogman's help, Cade delves into the Camelot past, and finds that they must take the H.M.S. Alliance into the sea to find the staff inside the ancient machine. Bumblebee, Yeager, and Viviane go to the Alliance with Cogman and Burton, who declines to go on the journey any further though cogman continues. The Alliance heads for the machine, but is intercepted by a TRF submarine. The Alliance ventures inside the machine, where Yeager find a chamber of Cybertronian Knights, as well as Merlin's staff. One Knight, Skullitron, awakens and attacks them. The TRF intervenes and attacks Skullitron, while Viviane activates the staff and the machine rises towards the ocean's surface. As more Knights rise up to fight, Soundblaster, intervenes and takes the staff from the humans with the intention of restoring his homeworld dismissing the planets doom as collateral damage.
Bumblebee confronts and fights Barricade on top of the machine, as Yeager and Lennox struggle to step in. Optimus manages to save Bumblebee, he speaks, much to Cade and prime shock, but Soundblaster escapes with the staff. The Cybertronian Knights then attack Optimus for his betrayal, but Yeager whose talisman becomes the Excalibur sword stops the judgement. The Knights yield to Yeager quoting their former comrade, who urges Optimus to protect the Earth once more.
At the Knight Ship, Soundbalster activates a drill to begin draining the core of its power using the staff and some nuclear fuel rods supplied from Attinger whom he killed after. As the military intervenes, Nemesis shoots Burton, who dies by Cogman and Cade's side. Optimus unites the Knights with the Autobots and the TRF soldiers. Boarding Dragonstorm, they set off to stop the villains. They raid Lockdowns ship killing buzz saw in the process angering soundblaster and battle against the Decepticons and free their allies. The Autobots then go to stop him while TRF soldiers engage the mercenaries and bumblebee takes on his old enemy for the last time so they can get to the staff. As Optimus drift and hound approach the bridge nemesis damages hound but is then put down by prime, the Autobots battle Soundblaster but drift sacrifices his life to save prime, who then defeats Soundblaster. While Bumblebee destroys barricade, and Cade with Lennox help removes the staff and the drill shuts down and is destroyed by the knights while soundblaster muckily claims prime had doomed their world permanently optimus declares that earth was the transformers home now and kills the notorious decepticon for good they then escape while Lockdowns ship crushes in to the ocean.
The Autobots re-unite after the battle and raise statues to honour their fallen friend and burton, and Optimus places drifts swords in a cross on his statue and declares that his faith will be in humanity if they will trust them the president thanks them. The Autobots than ride off calling all others to come to their new world.
In a mid-credits scene, scientists inspect a part of Unicron. Wondering what it is, while beneath the planets crust the being optic twitches and begun glowing.
- Mark Wahlberg as Cade Yeager
- Laura Haddock as Viviane Wembly
- Josh Duhamel as William Lennox
- Isabela Moner as Izabella
- Anthony Hopkins as Sir Edmund Burton
- John Turturro as Seymour Simmons
- Santiago Cabrera as Santos
- Jerrod Carmichael as Jimmy
- Glenn Morshower as Morshower
- Stanley Tucci as Merlin
- Liam Garrigan as King Arthur
- Martin McCreadie as Lancelot
- Gil Birmingham as Sherman
- Tony Hale as JPL Engineer
- Mitch Pileggi as TRF group leader
- Peter Cullen as Optimus Prime
- Erik Aadahl as Bumblebee
- Omar Sy as Hot Rod*
- John Goodman as Hound
- Ken Watanabe as Drift
- John DiMaggio as Crosshairs
- Jim Carter as Cogman*
- Reno Wilson as Sqweeks
- Mini Dinobots
- Tom Kenny as Wheelie
- Steve Buscemi as Daytrader
- Steven Barr as Topspin
- Mark Ryan as Bulldog
- Mark Ryan as Lieutenant
- Northrop Autobot
- HMS Alliance Autobot
- Frank Welker as Megatron
- Jess Harnell as Barricade*
- John DiMaggio/Steven Barr as Nitro Zeus**
- Reno Wilson as Mohawk
- Starscream's head
- Decepticon Protoforms
Knights of Iacon Edit
*Certain lines from these characters are not delivered by their credited actors, but the fill-in actors who performed the "scratch track" for the movie, whose recordings have survived into the finished film.
**Nitro Zeus' voice actor varies depending on the version of the film. The "finished" version shown in English-speaking countries features John DiMaggio, and the other, shown internationally, features Steven Barr. Both the home video and digital releases of the film credit both actors.
†Denotes a character who speaks, but has no credited voice actor. The internet has popularly attributed these roles to DiMaggio, Barr, and Welker, variously, but often incorrectly, and with no proof; more likely, at least some are performed by scratch track actors and were not replaced for the finished film.