Transformers: The Last Knight
Credit goes to Wikipedia.
In 484 AD, King Arthur and his knights fight a losing battle against the Saxons. Elsewhere, Merlin approaches the Knights of Iacon, a group of Transformers hiding on Earth, to help win the war. They hand him an alien staff, before transforming together into Dragonstorm and turn the tide of the battle, but warn Merlin that a great evil will come for the staff.
In the present, five years after the Hong Kong Uprising, Optimus finally arrives on Cybertron, and meets his alleged creator Quintessa. She, who originally sent Lockdown to bring him to her, blames Optimus for Cybertron’s destruction and brainwashes him, renaming him Nemesis Prime. After which, she orders him to travel to Earth to help her get Merlin’s staff, which can absorb Earth’s energy to restore Cybertron. Earth is revealed to be Unicron, the ancient enemy of Cybertron, and whose horns are emerging across the planet.
On Earth, Transformers remain unwelcome among humanity, apart from in Cuba, and are hunted by the Transformers Reaction Force (TRF); a paramilitary force manufactured from the fallen Cemetery Wind. However, the U.S. military, particularly those who had formerly worked with the Transformers, such as Colonel William Lennox, is secretly against the new policy. Cade Yeager, an ally to the Autobots, helps hide refugee Transformers from the TRF in his remote junkyard. In the war-torn Chicago, Cade, Bumblebee, young scavenger Izabella and her Transformer companions Sqweeks and Canopy help a group of three young boys evade the TRF drones, but Canopy is killed by a fighter jet when the TRF mistake him as a Decepticon. Cade receives a mechanical talisman from a dying Autobot knight and has a brief standoff with the TRF and their leader, Santos, before being saved by Bumblebee, Lennox, and Hound. Cade returns to his junkyard with Izabella and Sqweeks with the talisman. Both Megatron and the U.S. government become aware of the talisman’s value and power, reluctantly joining forces to obtain it. A group of Decepticon prisoners are released to aid in the mission.
The Decepticons and the TRF locate Cade’s hideout with the help of a tracker previously planted on Bumblebee. Grimlock and the Dinobots ambush a TRF convoy. Cade, his assistant Jimmy, Izabella, and Sqweeks flee from the Decepticons and the TRF to an abandoned town where the Autobots ambush their enemies and defeat them while Cade, Jimmy, and Izabella battle a unit of TRF drones. Cogman, a steampunk Transformer Headmaster, appears and invites Cade to the United Kingdom to meet his employer, Sir Edmund Burton, who has connections to the Transformers. Burton also has another Transformer associate named Hot Rod who he orders to find Viviane Wembley, a University of Oxford professor, and bring her to him. On his way back, Hot Rod gains an alternate form after scanning a passing Lamborghini Centenario LP770-4 sports car.
Bringing Cade, Viviane, and Bumblebee together, Burton explains that Transformers have been aiding mankind in war for centuries, their existence hidden by a secret society of famed historical figures, the Order of Witwiccans, of which he is the last living member. The talisman can lead to Merlin’s staff, buried with him in a Cybertronian spacecraft hidden under the sea. However, only a direct descendant of Merlin can wield it due to the knights encoding his DNA into it. Viviane is revealed as the last of Merlin’s bloodline. The TRF and local authorities discover them, forcing them to flee. Following a series of clues while evading their pursuers, the group head to the Royal Navy Museum. There, Cade, Viviane, Bumblebee, and Cogman commandeer the museum submarine HMS Alliance, also a Transformer, to find the spacecraft. The TRF, working together with the US Navy SEALS, after a failed attempt to stop the Alliance, pursue them in DSV submarines.
Burton contacts Seymour Simmons, both learning that Earth is Unicron, and the staff will be used to drain the planet’s life, via an access point hidden under Stonehenge. Locating the ship, Cade and Viviane discover Merlin’s tomb and obtain the staff. Viviane activates it, causing the spacecraft to become airborne, awakening the Knights of Iacon. As the TRF and Navy SEALS, now under Lennox, try to take the staff from them, Nemesis Prime arrives, forcing the humans to surrender the staff. Bumblebee, Lennox, and Cade confront Nemesis who engages in battle with Bumblebee. Just as Nemesis is about to finish him off, the formerly-mute Bumblebee begins speaking in his own voice (rather than the radio), stirring Optimus’ memories and freeing him from Quintessa’s control. The Decepticons ambush Optimus and Cade and steal the staff from him. The Knights try to execute Optimus for his “betrayal,” but Cade stops them when his talisman transforms into Excalibur. The Knights yield and join the humans and Autobots. Burton tries to stop Megatron from activating the staff at Stonehenge only to be mortally wounded, dying peacefully with Cogman at his side.
At the same time, Cybertron’s remains collide with Earth to begin draining energy from it, devastating the planet and killing millions. The Autobots, Dragonstorm, and human military forces converge on Stonehenge and Cybertron, attacking the Decepticons and Quintessa’s minions, who either flee or are killed while Quintessa is defeated by Optimus and Bumblebee. The worlds are then saved upon Viviane removing the staff and the Autobots leave Earth to rebuild what is left of Cybertron.
In a mid-credits scene, Quintessa, who has survived by using a space bridge to escape and is disguised as a human, approaches a group of scientists inspecting one of Unicron’s horns, offering a way to destroy him.