Transformers: The Last Knight is a 2017 American science fiction action film based on the Transformers toy line created by Hasbro. It is the fifth installment of the live-action Transformers film series and a sequel to 2014’s Transformers: Age of Extinction. Directed by Michael Bay, the film features Mark Wahlberg returning from Age of Extinction, with Josh Duhamel, John Turturro and Glenn Morshower all reprising their roles from the first three films, with Laura Haddock and Anthony Hopkins joining the cast. Bay and Wahlberg have stated they will not return for another sequel.
In 484 AD, King Arthur’s wizard Merlin forges an alliance with the Knights of Iacon, a group of twelve Transformers who have hidden on Earth. The Knights give Merlin an alien staff, and combine into a huge dragon to help Arthur triumph over the Saxons.
In the present day, most of the governments on Earth have declared Transformers outlawed, and the multinational Transformer Reaction Force (TRF) has been formed to destroy the alien robots. Despite the absence of Optimus Prime, who left the planet to search for his creator, new Transformers continue to arrive regularly; the newest ship to arrive crash-lands in the half of the ruins of Chicago, where it is found by a group of children. When a TRF mecha confronts the kids, they are saved by Izabella, a survivor of the Battle of Chicago and her Transformer companions Sqweeks and Canopy, but Canopy is killed by the TRF in the process. Bumblebee and Cade Yeager arrive and help them escape, but Yeager is unable to save the Transformer in the ship. Before he dies, the knightly robot gives a metallic talisman to Yeager — an act observed by Decepticon scout Barricade, who reports this to his leader, Megatron.
On the far reaches of the Solar System, Optimus discovers that the Transformers’ homeworld, Cybertron, now disassembled into pieces, is heading directly for Earth. He finds the being in control of Cybertron’s movement, the sorceress Quintessa, who professes to be the maker he is searching for. The staff which the Knights gave to Merlin was stolen from Quintessa, and using her powers, she places Optimus under her control, dubs him “Nemesis Prime” and charges him with recovering it. Earth, she reveals, is actually Cybertron’s “ancient enemy” Unicron and she intends to drain his life force so that Cybertron can be restored.
TRF member and former Autobot ally William Lennox brokers a deal between the TRF and Megatron, releasing from their custody a squad of Decepticons that will help Megatron recover the talisman from Cade. Megatron hunts Yeager down and follows him to his junkyard hideout in South Dakota, where he and many of the surviving Transformers are holed up. After the Decepticons retreat, Yeager is approached by Cogman, a Transformer envoy of British Lord Sir Edmund Burton, who takes him and Bumblebee to England to meet his master. There, Burton arranges a meeting between Yeager and Viviane Wembly, an Oxford professor. Wembly has just been kidnapped by the Autobot Hot Rod, using his long-term disguise as her Citroën DS. Burton explains that he is the last living member of the “Witwiccan” order, an ancient brotherhood dedicated to guarding the secret history of Transformers on Earth. He also reveals that Viviane is the last descendant of Merlin, and that she must find and use his Staff to prevent the impending destruction of Earth by Cybertron.
Fleeing the TRF, Yeager and Wembly follow clues left by the latter’s father that lead them, Bumblebee, and Cogman to take the submarine HMS Alliance into the sea to find the Cybertronian Knights’ sunken ship, in which they discover the tomb of Merlin and the staff. Wembly activates the staff, and the ship rises to the surface; the TRF arrives to confront the group, but several Knights awaken and attack them. The attack is cut short by the arrival of the mind-controlled Optimus, and a battle between Optimus and Bumblebee ensues. At its peak, the normally-mute Bumblebee finally speaks, the sound of his voice proving enough to shock Optimus free of Quintessa’s control. Taking advantage, Megatron, who is revealed to be conspiring for Quintessa all along, arrives and steals the staff. As he flees with it, the Knights attack Optimus. However, Yeager, whose talisman becomes the sword Excalibur, stops the fight. Realizing that he is the last Knight, the Knights yield to Yeager, who urges Optimus to protect the Earth once more.
Megatron then delivers the staff to Quintessa, who begins draining the life force of Earth/Unicron via Stonehenge. When the British military intervenes, Megatron shoots Burton, who dies with Cogman at his side. Using a ship procured by the Autobot Daytrader, the Autobots arrive to join the fight, landing on Cybertron and battling against the Decepticons and Quintessa’s Infernocons. Optimus and his Autobots, backed up by the Knights in their dragon form, vanquish their foes. Optimus sends Megatron flying from Cyberton back down to Earth, while Bumblebee shoots and apparently kills Quintessa. Viviane removes the staff, stopping Cybertron’s destruction of Earth but leaving both world’s connected. Optimus declares that humans and Transformers must work together to rebuild their worlds, and sends a message calling any surviving Autobots to come home.
In a mid-credits scene, scientists inspect one of the horns of Unicron, which is extending out of the desert. Quintessa, who has survived and is disguised as a human, arrives and offers them a way to destroy Unicron.