Optimus Prime has lost all memory of ever being a Prime after using the Matrix of Leadership to send Unicron back into stasis; his memory has been reset to when he was still the data clerk Orion Pax. Megatron takes advantage of this, telling "Orion" that the Autobots are evil, taking him onto the Nemesis and setting him to work on a project deciphering Autobot enscriptions from the Iacon records. Back at base, the other Autobots are distraught at this turn of events, and upon discovering that Jack has the Key to Vector Sigma, they hatch a plan to get their leader back.
With the help of information from Starscream, the Autobots commandeer the Decepticon's Space Bridge to send Jack and Arcee to the Transformers' home world of Cybertron, with a plan to use the information stored in Vector Sigma to restore Optimus's memories. Meanwhile, after a run-in with Starscream, whom Megatron claimed was dead, "Orion" begins to wonder if Megatron is telling him the whole truth...
On Cybertron, while on their way to Vector Sigma, Jack and Arcee are attacked by a savage creature called an Insecticon, as well as a swarm of Scraplets. On the Nemesis, "Orion", becoming ever more curious about who he really is, begins to rebel against Megatron and uncover the elaborate lies put in front of him.
While investigating an energy signal that could potentially lead to a relic from the Vaults of Iacon, Bumblebee is ambushed by M.E.C.H, who knock him out and steal his T-Cog, the device that allows Transformers to scan vehicle modes and transform. Discovering that he is no longer able to transform into vehicle mode, Bumblebee has no choice but to stay at base, which leaves him frustrated. Meanwhile, as M.E.C.H. attempts to use Bumblebee's T-Cog in one of their own robots, Starscream approaches their leader Silas and suggests an alliance with M.E.C.H., offering his knowledge and advice on Cybertronian technology and how it works.
Ratchet, still feeling guilty about failing to repair Bumblebee's voice box during the war, volunteers to give Bumblebee his own T-Cog via transplant. The resulting operation is interrupted, however, when an alarm signals the discovery of another relic from the Vaults of Iacon, a legendary hammer known as the Forge of Solus Prime. While Optimus Prime, Bulkhead and Arcee are out retrieving the hammer, Agent Fowler calls the base to inform the Autobots of newly discovered coordinates to a M.E.C.H. hideout. Seeing an opportunity, Bumblebee storms the M.E.C.H. hideout on his own to get his T-Cog back.
Wheeljack returns to Earth in pursuit of the Decepticon Dreadwing, who is responsible for the death of the Autobot Seaspray (who was also a member of the Wreckers), and asks for Team Prime's help in apprehending the Decepticon. While Bulkhead is naturally excited about seeing his best friend again, Optimus Prime quickly becomes annoyed with Wheeljack's reckless and aggressive manner and disregard for civilians.
Megatron sends Airachnid, Breakdown and Dreadwing on the trail of a potential Energon source, but what Airachnid doesn't know is that Dreadwing and Breakdown have actually been ordered to kill her for potential treachery. She soon catches wind of this though, killing Breakdown and running off into the woods. Upon arriving at an abandoned Energon mine, Airachnid finds Starscream cowering from a large Insecticon. She uses her abilities to control the creature and calls Megatron to challenge him to a fight to the death, planning to use the Insecticon to kill Megatron so she can claim Decepticon leadership.
M.E.C.H. produces a clone of Optimus Prime, which Miko off-handedly names Nemesis Prime, and sets it loose on a military base, where it proceeds to wreak havoc. The United States Military immediately blames the real Optimus for the chaos, and they order the Autobots be shot on sight. While Agent Fowler tries to convince his superiors that Optimus did not attack the base, the Autobots try to track down Nemesis Prime and clear their names.
Agent Fowler is forced to explain recent events to his superior, the cynical and disbelieving General Bryce. Threatened with a military tribunal and Team Prime's termination, Fowler tries to convince the General that the Autobots are still on the military's side, but the General believes that Optimus Prime went rogue and has perished, failing to fully understand that Nemesis Prime was not the real Optimus.
Bulkhead accidentally becomes trapped on board the Decepticon warship, the Nemesis, while on a scouting mission, and tries to escape without being discovered. Meanwhile, Starscream and Airachnid both send their newly gained armies (Starscream's being five clones of himself, and Airachnid's being an enormous swarm of Insecticons) to the Nemesis, both with the order to kill Megatron.
The Nemesis has crashed on a mountainside and its engines are badly damaged. Megatron attempts to restart the engines with Dark Energon, which works, but has an unexpected side effect: the ship develops a mind of its own and starts to rebel against its own crew. With the ship flying out of control and both the Autobots and Decepticons frozen in stasis, Jack, Miko, Rafael and Agent Fowler are left as the only ones who can stop the ship's rampage.
Having discovered the locations of four relics from the Vaults of Iacon hidden across the globe, the Autobots split up into small groups and head to each location simultaneously to retrieve them. Arcee, Bumblebee, Jack and Miko travel to New York City to find the first relic, a Phase Shifter, a device that enables its user to walk through solid objects, which is buried deep in the city's underground subway tunnels. During their search however, Arcee and Bumblebee are attacked by Knock Out and an Insecticon.
Optimus Prime is in Antarctica on the hunt for the second Iacon relic, the Apex Armor, a full-body suit of indestructible armor that expands from a small disc. However, he comes into conflict with both Dreadwing and Starscream during his search, and he is forced to form an uneasy alliance with Dreadwing when Starscream dons the Armor and threatens them both.
Ratchet reluctantly calls upon Wheeljack for back-up in his mission to retrieve the third Iacon relic, a sonic weapon called the Resonance Blaster. On their way to the location, the two Autobots are attacked by Soundwave, but Wheeljack manages to shoot down and disable Soundwave's surveillance drone Laserbeak, which gives Ratchet an idea. While Wheeljack and Soundwave fight over the Resonance Blaster, Ratchet uploads a virus into Laserbeak that will download the Iacon Database into the Autobot Base's computers without the Decepticons noticing.
Bulkhead goes to a volcanic island on the Equator to find the fourth and final Iacon relic. But to his horror, he discovers that the relic is a piece of Tox-En, a form of highly toxic Energon that is lethal to Transformers. Bulkhead tries to dispose of the Tox-En, but in the process the toxic Energon is deteriorating his strength. Also, a group of Insecticons confront and attack the Autobot, as he throws the Tox-En into the volcano. Upon making his way back to the base, he suffers a fatal blow from Hardshell, the Insecticon leader.
Bulkhead is left in a critical condition after his ordeal with the Insecticons. As he lies in stasis while the other Autobots monitor him, Wheeljack and Miko head out to find Hardshell and exact revenge for what has happened. At an Energon mine, Wheeljack engages with Hardshell and his Insections, as Miko watches the battle from his ship. Wheeljack becomes heavily injured, at which point Miko fires the ship's missiles, killing Hardshell. Meanwhile, Knock Out tries to convince Megatron that the Insecticons are a danger to the rest of the crew after Hardshell had attacked a pair of troopers.
Miko is angered by Bulkhead's slow recovery and storms out of the base. Arcee tries to cheer her up by telling her the story of how she and her old battle partner Cliffjumper first came to Earth: The two were captured and brought to Kaon by Starscream, interrogated by the Decepticon scientist Shockwave, and uncovered Shockwave's plan to build a Space Bridge. Miko and Arcee share from their respective experiences that they should not be closed off from others.
During a fight with the Decepticons, the Autobots are unexpectedly aided by Smokescreen, a young and adventurous Autobot. Despite Arcee and Ratchet's distrust in the newcomer, Optimus Prime invites Smokescreen to the base for further training. Later, Starscream and the Autobots battle for Red Energon, which grants the consumer enhanced speed. The Autobots return to the base, where Optimus Prime welcomes Smokescreen as the newest member of the group, leaving a still-injured Bulkhead in fear of being replaced.
Silas is merged with Breakdown's body as a result of a biotech surgery performed by the M.E.C.H. surgeon. With the new body, he terminates his crew, then confronts Megatron for a position in the Decepticon ranks, promising to aid their cause with Project Damocles, to create a satellite enabled to fire a particle beam with precision to any given location on Earth. Raf, however, manages to hack the system, leading the project to failure. Megatron calls Silas back to his warship, and orders him to be dissected by Knock Out.
The Autobots are led astray with a decoy pot from the Decepticons for Megatron to retrieve a new relic, until Ratchet informs the rest of the crew of the real location containing the actual relic, the Star Saber. The relic is lodged in a mountain, and it can be removed only by an Autobot leader, a "Prime". The Autobots eventually arrive at the location. Optimus Prime is able to wield its power and send a powerful attack to the Decepticon's warship. Back at the base, Optimus Prime receives an incoming message from Alpha Trion via the Star Saber.
Alpha Trion informs Optimus Prime about the last four remaining relics left in play, those being the Omega Keys capable of regenerating Cybertron through the Star Saber across the ages. Megatron goes to Cybertron and desecrates a sacred tomb of an unidentified Prime along with his second in command, Dreadwing, to obtain it's hand so he can master the Forge of Solus Prime. After using the Forge of Solus Prime to create the Dark Star Saber from a chunk of Dark Energon, he challenges Optimus Prime to a battle in which the Star Saber's blade is broken remaining only his hilt. This unwittingly allows Smokescreen to retrieve the Omega Key with some help from the Phase Shifter and he and Optimus return to the Autobot base. Smokescreen receives the Phase Shifter as his permanent weapon but looks at the Star Saber in despair, before being cheered up by Ratchet telling him that Prime does not need it to be the mightiest warriors.
When Optimus determines the whereabouts of the second Omega Key, Bumblebee and Arcee attend to the destination to retrieve it. But Knock Out, wielding the Resonance Blaster, gets there first and recovers the key. Similarly, Bulkhead and Smokescreen head out to find the third Omega Key, but Starscream, equipped with Red Energon, knocks out Smokescreen from behind and takes the key. The final relic is discovered to be inside Smokescreen himself. Soundwave manages to kidnap him and accordingly retrieve the fourth key.
After Smokescreen is brought on board the Nemesis, Megatron learns that the final Omega Key is within the young Autobot. Despite this, Smokescreen manages to not only steal the second Omega Key, but retrieve both the fourth Omega Key and his Phase Shifter back from Knock Out and Megatron and escape the ship. Later, however, Starscream uses his new speed power ,courtesy of the single dose of Red Energon, to sneak into the base and steal the remaining Omega Keys, giving him all four keys. He sneaks his way onto the Nemesis and presents the Omega Keys to Megatron as a peace offering.
Starscream approaches Megatron with the four Omega Keys, proposing a truce with the Decepticons. Skeptical, Megatron orders Knock Out to set up a cortical psychic patch in order to discover Starscream's true intentions within his memories. However, despite the past events revealed to him, in the end Megatron allows Starscream to rejoin the Decepticons, for every member's participation is imperative in aiding the leader's cause of conquering Cybertron.
Dreadwing offers the Forge of Solus Prime to the Autobots, and Optimus Prime uses the relic to upgrade the Autobots' ground bridge into a space bridge, enabling direct transport to Cybertron. Then on the Nemesis, Dreadwing tries to kill Starscream after his T-Cog is installed, but Megatron kills him for disobeying his order to stand down. The Autobots race to the Omega Lock on Cybertron, defeating Megatron's army of troopers along the way while regaining all four keys.
Megatron then puts the Omega Lock to use, initially to reform the war-torn Cybertron, but then also to convert Earth into a new metal planet, at which point Optimus is forced to destroy the Omega Lock. The Autobots retreat back to Earth.