In 1961, the Ark, a Cybertronian spacecraft carrying an invention capable of ending the war between the benevolent Autobots and the malevolent Decepticons, crash lands on the dark side of Earth’s Moon. The crash is detected on Earth by NASA, and President John F. Kennedy authorizes a mission to put a man on the Moon as a cover for investigating the spacecraft. In 1969, the crew of Apollo 11 lands on the Moon.
In the present, the Autobots assist the United States military in preventing major conflicts around the globe. During a mission to Chernobyl to investigate suspected alien technology, Optimus Prime finds a fuel cell from the Ark, discovering that it had survived its journey from Cybertron. The Autobots are then attacked by Shockwave, who manages to escape. After learning of the top-secret mission to the Moon, the Autobots travel there to explore the Ark. They discover a comatose Sentinel Prime – Optimus’ predecessor as leader of the Autobots – and the Pillars he created as a means of establishing a Space Bridge between two points to teleport matter. After returning to Earth, Optimus uses the energy of his Matrix of Leadership to revive Sentinel Prime.
Meanwhile, Sam Witwicky is frustrated that he is unable to work with the Autobots or find a job. He also becomes envious of the close relationship between his new girlfriend, Carly Spencer, and her boss Dylan Gould. After finding work, Sam is provided information by his eccentric co-worker Jerry Wang about the Ark, before Jerry is assassinated by the Decepticon Laserbeak. Sam contacts the now-independently wealthy Sector 7 Agent Seymour Simmons, and together they realize that the Decepticons and their leader, Megatron, are murdering people connected to the American and Russian space missions to the Ark. They locate two surviving Russian cosmonauts, who reveal satellite photos of hundreds of Pillars being stockpiled on the Moon. Sam realizes that the Decepticons raided the Ark long before the Autobots’ mission to the moon and intentionally left Sentinel and the five Pillars behind to lure the Autobots into a trap with Sentinel being the key to activating the Pillars and the Decepticons lacking the means to revive him. The Autobots rush to return Sentinel to their base for protection, but Sentinel betrays them and murders the Autobot Ironhide, revealing he had made a deal with Megatron to ensure Cybertron’s survival.