The movie opens opens 50 years ago, with voiceover describing the long, cataclysmic Cybertronian War between the Autobots and Decepticons that left the mechanical planet in ruins. A close up of Cybertron reveals multiple layers of metal plates stacked one upon another, instead of ground, with each plane saturated with a seemingly infinite number of robots in all shapes and sizes annihilating one another. In the midst of this planet-wide battle, a large starship is seen rocketing through gaps in all the metal plates, hotly pursued by twin fighters. The voiceover reveals the ship is the Autobot Ark, piloted by Sentinel Prime, the leader of the Autobots before Optimus Prime. Aubobot legend has it that Sentinel Prime made one last impossible gambit to win the Cybertronian War, by jetting the Autobots' most futuristic technology away from the battle in hopes of staging a counter attack against the Decepticons. But in this escape flight, the Ark was severely damaged and ricocheted into space, not to be heard from again.
The Ark crash-lands on Earth's moon in 1961, with seemingly no survivors. Sentinel Prime locked himself into a vault on the ship, along with the Autobots' futuristic war-ending technology. NASA detects a crash of something large on the moon and immediately launches an investigation to determine what it could have been. President Kennedy ignites the space race to beat the Soviets to the moon. It's determined through the course of the movie that every US and USSR space effort between 1961 and 1972 involved recovering whatever was possible from the Ark's wreckage. Archival footage of Kennedy, Walter Cronkite, and also President Nixon is used in establishing shots showing the various US missions in the Apollo program -- and what they "really" were for. When Neil Armstrong lands on the moon and delivers his "one small step for a man, one giant leap for mankind speech", people listening to the radio and watching TV believe there's a 20-something gap in the broadcast because of technical difficulties, but in reality ,NASA send Armstrong and his fellow astronaut into the Ark's wreckage for the first time, telling him that he has 20 minutes to explore it before he has to broadcast more for the American public back home.
The astronauts enter the Ark and declare that everything inside is dead. They find the bodies of various Autobot robots, most still manning the gun turrets they were blasting before the ship crashed. Inside the cavernous wreck, the two humans seem tiny and begin scavenging for whatever technological bits and pieces they can take back to Earth with them. They do not discover the Ark's vault with Sentinel inside, but do find large metal faces, as they call them, which disturb NASA and necessitate the subsequent Apollo missions through 1972 to continue investigations of this crash site.
The camera shows Sentinel Prime inside his vault, with just a bare flicker of blue Energon inside his eye...meaning, he is still alive, but very damaged...waiting.
When the astronauts splash down in the Pacific with their haul from the moon, NASA takes special TOP SECRET silver boxes into possession containing this Cybertronian technology. Though not seen, it's implied the Soviets are doing the same thing whenever possible on their own missions...meaning Autobot technology arrived on Earth long before the events of the first Transformers film in 2007.
The film picks up in present day with Sam Witcicky (Shia LaBeouf) now living in Washington, DC with a beautiful British-accented girlfriend named Carly Spencer (Rosie Huntington-Whitely). Carly bought Sam a giant plush rabbit for his luck to change in what's been a fruitless job search since his graduation from an unnamed Ivy League school. Sam can't find a job in the current economy, despite "having saved the world twice"...which is a fact no one outside the government supposedly knows, since the events of the previous two Transformers films have been exhaustively covered up by world governments. Sam is shown receiving a medal of thanks from President Obama in the Oval Office, in a rushed non-ceremony that took less than five seconds before he was shuffled off into a hallway, his proud parents Judy and Ron Witwicky (Julie White and Kevin Dunn) watching. Carly worked at the White House at the time, as a member of the British embassy assigned to a post there. Sam met Carly shortly after his medal non-ceremony, and the two bonded as Sam accidentally knocked over a historic crystal bowl that smashed in front of the two of them (causing embarrassment no doubt). Carly is now working as the curator for an extensive art and rare cars collection owned by billionaire Dylon Gould (Patrick Dempsey) and his company, which began as an accounting firm and now contains venture capital divisions too. Carly has been supporting Sam, and letting him live rent-free in the massive, ornate (but run-down) apartment in DC while he looks for jobs. Carly even gives Sam "lunch money" every day, which he resents, since in his opinion a guy who saved the world -- TWICE -- and has a presidential medal to prove it should not need to get lunch money from his girlfriend.
Sam is without his friend Bumblebee since the Autobots have been deployed around the world hunting down the remaining Decepticons who still inhabit the Earth since the events of the last movie, Revenge of the Fallen. Around the world, "Energon Detectors" have been setup in all the major cities, which apparently have the ability to detect Transformers. Bumblebee is off on secret missions without Sam, and it seems the Autobots have little contact with Sam anymore...save for Wheelie (a toy truck) and Brains (a ghetto-voiced weird little robot that has white hair and never transforms) who live with Sam like pets. Sam keeps these two robots in a cage and makes them stay outside with his dog most of the time, which the two resent. We learn from the robots that Sam's last girlfriend (played by Megan Fox), was mean to them and that they're glad she's gone. This is a quick explanation why Fox is not in the movie and has been replaced by Carly (nodding to the reality that Fox alienated herself from Director Michael Bay and Producer Steven Speilberg and was not asked to return for this third film).
Sam's parents, Ron and Judy, have been traveling the country in a suped-up bus with all the bells and whistles, and though they said they would be visiting him on the 21st of that month, they show up several weeks early...unannounced. They chide Sam for not having a job...and ridicule him that "his car" Bumblebee currently has a job while he doesn't. Sam tells his parents that he has many job interviews lined up, and they insist on driving him to them since his car is a piece of junk. Sam's mother has a profane way of putting things and is incredibly blunt. The two, in addition to Wheelie and Brains, are supposed to serve as comic relief interspersed throughout the film, as they believe Sam is a slacker and want to make sure he keeps ahold of his hot girlfriend Carly, since Judy especially doesn't believe Sam will "get a third one" like these in terms of girlfriend...especially without a job.
While this is happening, the Autobots are off on various missions around the globe, hunting down Decepticons, and also looking for Weapons of Mass Destruction. There is a quick scene where they take down what appears to be the Iranian nuclear program, and another where the NEST agents from the previous films are working parallel to the Autobots to track other technological anomalies around the globe. In the Ukraine, there's something inside the ruins of Chernobyl that needs NEST's attention. NEST is the "international task force" that was setup in the first Transformers movie to work alongside the Autobots, and put these robots under human governmental control. Major Lennox (Josh Duhamel) is the returning NEST operative from previous films; he meets with a Ukrainian official about something alien the Soviets were monkeying with that caused the Chernobyl disaster in 1986. Lennox and his team suit up in their protective gear, since Chernobyl will be radioactive for another 20,000 years...the ruins of a merry-go-round, a school, and various Soviet monuments remain in the abandoned city. The Ukrainian official does not wear any protective gear, saying it doesn't matter because he will not live much longer anyway. He escorts Lennox and his team into a secret underground complex beneath a school in Chernobyl to show him what "really" caused the disaster there. The audience gets a glimpse of Laserbeak (now a weird vulture transformer) spying on the NEST team in the dark.
It appears the Soviets recovered part of the Autobot Ark's engine, somehow, on various space missions in the late 1960s. After attempting to reverse-engineer the technology, the USSR thought it could power Chernobyl with this engine piece and attempted to bring the facility online in 1986...with the disastrous result of obliterating the city. The engine part has been sitting there since then, and the NEST team mounts an effort to remove it to Washington, DC for safekeeping. Suddely, a monstrous Decepticon drilling machine with massive tentacles bursts through the ground and attempts to steal the engine piece. Lennox and his team have to fight this beast until the Autobots arrive as reinforcements. The giant Decepticon looks like a sandworm from Dune or Beetlejuice, and has the ability to "swim" in and out of the earth, destroying buildings as it goes. Optimus Prime and a cadre of various Autobot sports cars arrive to fight this unnamed Decepticon...who ends up being just a minion of ShockWave, who maintains his iconic cyclops form from the 1980s cartoon (but oddly never transforms into anything during the movie). Shockwave is very quickly defeated as Optimus Prime uses the giant sword and axe he stores in the trailer part of his truck form to beat-up ShockWave. The Autobots recover the engine part and return to DC with NEST.
Laserbeak finds the Ukrainian official that guided NEST to the engine part and assassinates him, telling the man he has outlived his usefullness to the Decepticons.
Meanwhile, in Africa, Megatron has survived events from the last film and is tooling around the Serengeti as a massive Mad Max-inspired post-apocalyptic truck. His head is badly damaged and teems with robot spiders and mechanical flies. He is clearly more insane than ever, and has been gathering scrap metal to feed the collection of oddball Decepticons that remain with him (including one that's a giant head with a long metal long that dances around Megatron, for "comic relief" apparently). Soundwave is now a car-transformer of some sort, having abandoned the satellite form he took in the last film. Laserbeak arrives in Africa to report to Megatron on what happened at Chernobyl. Megatron then dispatches Laserbeack to assassinate other humans who have been helping Decepticons but are now no longer needed.
Back in DC, Sam begins interviewing at various corporations, all of whom have something to do with the international relations/private-public partnerships field he got his Ivy League degree in. Because jobs are scarce and Sam has never worked anywhere before, he's not having any luck with his interviews. Many people have Googled Sam and refer to the FBI warrant that was issued for him in 2007 during the first film, which Sam has to explain as "a misunderstanding that's been expunged from his records". This is still keeping Sam from getting a job, so there's more complaint from him about having saved the world twice, without anything positive to show for it, like a job. Finally, Sam interviews with Bruce (John Malkovitch) at a global communications firm named Accuretta. This company is a tense and insane place to work, with each floor color-coded so that someone drinking a red cup on a "yellow floor" is disciplined for breaking the harmony of the office. Bruce is a real stickler for details like this, and seems like an ogre to work for. He tells Sam that he must start work in the mail room before he can do anything important, but Sam has a hard time accepting the demotion from world-saver to mail room boy. Bruce tells him that he received a letter of recommendation from someone on the Board of Directors so that Sam has a job there if he wants it. Without other prospects, Sam takes the job, but wonders who on the Board recommended him since he did not think anyone in high places was helping him find work.
At the NEST headquarters in DC (hidden in what appears to be the Department of Health and Human Services), Optimus Prime is furious with the humans for not revealing the existence of the engine part recovered at Chernobyl. This is because Optimus was assured that humans had shared everything they knew about the Transformers with him. The Director of the National Security Agency, Charlotte Mearing (Frances McDormand), arrives to explain what happened and that even she was not aware of the engine piece until very recently, since it was beyond Top Secret. Buzz Aldrin makes a cameo as himself in a scene where he and other NASA officials brief Optimus on the crashed alien ship they discovered on the moon in the 1960s. Optimus realizes the ship is the Autobot Ark, containing Sentinel Prime and the technology the Autobots believe could have won them the Cybertronian Civil War if it hadn't disappeared 50 years ago. Plans are immediately launched to use the Autobots' spaceship to head to the moon and investigate the crash site to see if Sentinel Prime is still alive and if the technology is still in the vault.
When the Autobots arrive, they indeed find Sentinel Prime, who appears almost dead. There are also 5 floating canisters of techonology floating around Sentinel that are brought back to Earth as well. Back at the NEST headquarters, Optimus uses the Matrox of Leadership inside his chest to revive Sentinel -- this is a small blue-energon-glowing object that Optimus can make float in the air outside his body. Exposition reveals it is the only thing in the universe that can give life to a Transformer and only Optimus has control of it. Sentinel reawakens and immediately tries to kill Optimus, thinking he was still on the Ark in the heat of battle when he was deactivated. Sentinel is voiced by Leonard Nimoy and is designed to look vaguely like him (when he does transform in this film, he takes on the shape of a fire truck). Sentinel tells Optimus and NEST that the technology he possessed were the "pillars" that would have won the Autobots the war because they are able to transport Transformers from one place to another...so Optimus deduces this could have been used to transport the Autobots from Cybertron before they were decimated, so they could have mounted a tactical retreat to regroup and take back the planet before the war was lost. Optimus is sad that he failed and the Decepticons defeated the Autobots, and offers to give up leadership to Sentinel. Sentinel however, says that he does not know enough about this world and that Optimus should remain the Autobots' leader, and that there was nothing Optimus could have done to win the war.
While this reunion is happening and Sentinel is filling NEST in regarding the "pillars" and the advanced technology he designed, Sam is feeling threatened by Carly's very successful boss, Dylan Gould (Patrick Dempsey). Gould's offices are in a futuristic, gorgeous building (the location is actually the Milwaukee Museum of Art) where he keeps several gorgeous race cars in the lobby and all sorts of valuable art on the walls. There are also many photos of Gould and Carly prominently displayed, which Sam becomes very jealous of. Sam is there to pick Carly up from work as she does not have a car, but Sam's car is a broken down yellow hoopty that won't start. He's embarrassed when Gould catches him kicking his car to get the engine to work; Gould emasculates him by not only instantly fixing the engine, but also by telling Sam that HE was the Board Member of the Accuretta company that gave the job recommendation since he heard Sam was having trouble finding work. Sam thinks he should keep a closer eye on Carly since it's clear this very wealthy man Gould has designs on her.
Seymour Simmons (John Turturro), the former government agent turned conspiracy buff in the last film, has written a book and is on Bill O'Reilly's FOX show talking about the danger to humanity that Decepticons pose, but O'Reilly calls him a pinhead and essentially says the Decepticons are under control. Simmons tells O'Reilly to read his book and learn that there is much that's not known about the Transformers that the government will not tell anyone about, including all manner of secret deals and assassinations and the rest of what's contained in various conspiracy books.
Simmons is actually correct, because Laserbeak has been busy assassinating the humans who have been collaborating with the Decepticons. Sam begins working at Accuretta, in the mail room, and he's told that he must work there for two and a half years before he can be promoted to something more meaningful. He's dejected, but Carly comes to visit him and the whole office is impressed with his gorgeous girlfriend, including Bruce. Carly gives Sam a red cup full of red licorice as a first work day gift, even though Sam works on the "yellow floor" where only yellow cups are allowed. Because Carly is so beautiful, however, no one hassles Sam over this infraction. As Sam goes about his job, Jerry Wang (Ken Jeung from The Hangover and other movies) stalks Sam -- and it's not clear why, though it's implied Wang might have a crush on Sam. When Sam goes to the bathroom, Wang burts into the stall with Sam and the two have an uncomfortable bit where several gay jokes are made, with Wang calling himself "Deep Wang" and trying to explain he's making a 'Deep Throat" Watergate/conspiracy reference. Wang claims he has the secret intel on what the Decepticons are really up to and then drops his pants very close to Sam's face; Wang has hidden drawings and notes in a roll of papers that he kept inserted in his underwear so the Decepticons would never find it. He gives this to Sam by jamming it very close to Sam's face -- in a moment that's designed to make the audience groan and wince. Sam takes the papers from Wang, just as Bruce comes into the bathroom and notes the commotion going on in the stall. Wang then leaves the stall with his pants down and approaches Bruce and stares him down in a macho contest; normally Bruce is the alpha male in a room, but Wang clearly bests him. Sam leaves the stall also and it looks like Wang and Sam were doing something sexual in the bathroom together, but Bruce does not say anything about it.
Sam then later tries to find Wang in his office to confront him about making Bruce think the two were up to something in the bathroom. Wang is having a conversation with someone, and has a computer mouse on his hand that's glowing red with nasty looking spikes. The mouse appears to be controlling him, and Wang keeps telling Sam to go away and that he doesn't know Sam. Finally, when Sam leaves, Laserbeak transforms from a computer screen and tells Wang that his usefulness has come to an end, and he must have an "accident". Wang tries to shoot Laserbeak, but Laserbeak just throws Wang and his chair out the window. Bruce is in a meeting and sees Wang fall to his death out the window, but reacts by telling everyone in the office to get back to work and ignore what's happening, since staring a the dead body will not bring Wang back to life. Bruce tells Sam he needs to remove Wang's name from his parking space and get someone to clean out his office, showing no concern for the fact that someone just died in the office. Laserbeak has now transformed into a copier/printer and is waiting for Sam to walk by so he can assassinate Sam too. Laserbeak misses Sam and there is a large fight at the office, which Sam escapes.
Sam gets Carly and they try to force their way into NEST headquarters in DC at the Health and Human Services building. At first the guards give them a hard time, but Bumblebee shows up and vouches for Sam and he and Carly are allowed inside. There, Mearing is upset Sam and Carly are being allowed near all the government secrets, but Lennox says that Sam knows all about the Autobots and that Carly knows too, so they should have security clearance. Mearing sits down with Sam and Carly and tells the two of them that they can't be involved in what's going on, but Sam keeps insisting that humans are working for the Decepticons and that the whole thing is linked to Sentinel Prime somehow...that there's a big plot with Sentinel Prime being the key. Mearning interprets this to mean that the Decepticons are going to try to assassinate Sentinel Prime, and though she doesn't give Sam credit, she appears to mobilize her team to protect Sentinel.
Sam then heads home, where he tries to contact Simmons to let him know the Decepticons are trying to kill him. Simmons' assistant, Alan Tudyk, won't put the call through at first, but eventually Sam talks to him and tells him about the "dark side of the moon" and the assassination conspiracy and Simmons agrees to come to Sam and help. Soon, Sam is in his apartment with Simmons and Bruce stops by because he wants to see at least one Autobot, and this was leverage Sam used to get Bruce to give him Wang's files, so they can figure out why Decepticons wanted to kill Sam, and killed Wang. Carly comes home as all these people are convened in her apartment and she's not happy. Sam gets upset that Gould has now given Carly a very expensive Mercedes car, worth over $200,000. The two of them have a little fight over this but Carly tells him not to be jealous. Carly goes upstairs while Sam and the other men there try to figure out what the Decepticons are up to since they don't believe Mearing and the government will be smart enough to stop them in time. They decide to go to follow a lead that Simmons has with former Soviet cosmonauts who defected in the 1970s and are hiding in the US, since the Soviets suddenly abandoned their space program and they need to know why.
At a Russian bar somewhere, Simmons, Sam, and the other guys get into a fight with several women who work as bartenders or escorts there. Once the fighting is over, several former cosmonauts tell them that the Soviets sent an unmanned photographic robot to the moon that took pictures of strange "rock formations" that appeared to have tread marks near them. Sam realizes those were not rocks, but were instead hundreds if not thousands of "pillars". He deduces that the Decepticons knew where the Autobots' Ark was this whole time and that whatever they have been up to was NOT about finding out what was on the moon, but about keeping what was on the moon hidden. Sam figures out that all this time the Decepticons were using humans at NASA, in the Soviet space agency, and in private companies like Accuretta to prevent more space missions to the moon and to conceal the fact that the Autobot Ark was there...all the while the Decepticons had already found Sentinel Prime and the "pillar's and were up to something big and decades-in-the-planning. Sam and the other men decide to race to NEST headquarters to tell Mearing and the others there everything they've figured out.
The Decepticons do try to go after Sentinel Prime, who was driving around DC as a fire truck for some reason. There is a pursuit, which Sam eventually takes part in, where three Decepticons disguised as black SUVs chase Sentinel back to NEST headquarters. Simmons is yanked out of his car and thrown onto the road, where he is crippled (he then remains in a wheelchair for the rest of the movie). One of the Decepticons looks like a panther in robot form, one looks like a werewolf, and one looks like the Predator, with dreds like that alien. There is a big fight and Sam is thrown out of Bumblebee and starts screaming, with Bumblebee catching him in the air and putting him back inside his body before transforming back into car form. This is really just an excuse to do special effects and have an action sequence here in the movie, with a lot of explosions and the chase scene back to NEST headquarters.
When they get back to NEST, Sentinel Prime kills one of the Autobots who was guarding him and tells everyone that he has been working with the Decepticons the whole time. There are thousands of "pillars' hidden all around the planet, which the Decepticons plan to use to teleport Cybertron via a space bridge into Earth's atmosphere. Sentinel then admits he knew the war was lost on Cybertron so he negotiated a deal with Megatron to bring the pillars to Earth, set them up, and teleport Cybertron here so the Transformers could take all of Earth's resources and rebuild Cybertron together. This was a deal Sentinel made "to save our kind", since he saw that the Civil War between the Autobots and Decepticons had devastated Cybertron and brought them all close to destruction. A big fight ensues, with Sentinel then escaping...to presumably join the Decepticons to implement his master plan.
Sam needs to find Carly, who has gone to meet with Gould at Gould's request, in his giant mansion somewhere. The car Gould gave Carly is actually Soundwave, who takes Carly prisoner so Gould can get Sam to cooperate. Gould reveals that his father was an agent of the Decepticons before him, and that the takeover of Earth has been underway for decades. Those who have been collaborating with the Decepticons have been promised a decent life once they took over. There is no way to resist them. Gould wants Sam to become a spy and find out how Optimus Prime plans on fighting back now that everything is coming out into the open. Gould says he will kill Carly if Sam does not cooperate, and also gets a wristwatch transformer to attach itself to Sam's body...which will force Sam to do what Gould wants, using great physical pain to achieve this.
Meanwhile, Sentinel Prime takes to the airwaves ordering the nations of the world to expel the Autobot "rebels" from the planet or else the Decepticons will attack the main cities and kill many people. The US Congress votes quickly to boot the Autobots with the UN and other foolish bodies doing the same. The US government ends the NEST program and tells the Autobots to get on a shuttle and go to another planet. All of this happens with ridiculous speed, and Sam suddenly is in Florida where the last US space shuttle is attached to an Autobot spaceship so NASA can make sure the Autobots really leave. This ship is called the "Xanthion" and it has been built by Autobot NASCARs called "The Wreckers", who have British punk voices. Major Epps (Tyrese Gibson) from the previous movies has been in charge of getting the Autobots off the planet.
Sam has an emotional moment with Optimus and Bumblebee before they board the ship to leave Earth. Once it blasts off, Starscream appears out of nowhere and attacks the shuttle, destroying it, and presumably killing everyone on board. Sam cries and Epps comforts him. The two of them decide they need to figure out where Sentinel Prime and the Decepticons have gone. Suddenly, Sam's phone rings and it's Gould, asking him what Optimus Prime told him regarding their plans to defeat the Decepticons. Sam tells him the Autobots had no plan and just left, but were then killed by Starscream. Gould then makes Sam feel worse by making it clear that Carly is his now and that Sam has to accept that. Epps realizes the NSA can track Gould's phone call, and they realize it came from within Trump Tower in Chicago...so everyone makes plans to go there.
In Washington, DC, however, Sentinel Prime and Megatron meet at the Lincoln Memorial, which Megatron has repurposed for himself, smashing Lincoln out of his throne and taking it for himself. Sentinel then assembles some of the "pillars" to open a space bridge to the moon...where it is revealed many Decepticons have been hiding for 50 years. They all come through the space bridge along with giant Decepticon transport ships. Once they arrive on Earth, these robots scan various vehicles and take Earth disguises for their alternate forms...garbage trucks, police cars, fire engines, etc. The Decepticons decide to dead to Chicago to assemble the "pillars" into a giant system to teleport Cybertron to Earth...though there is no reason given why they need to do this in Chicago and not in DC, where they all are at the moment.
In Chicago, Sentinel Prime takes over the Jeweler's Building on the Chicago River and makes it his headquarters. In one of the cupolas of this very ornate building, Sentinel hides the master control pillar that will activate all the other pillars around the globe that Decepticons will use to teleport Cybertron to Earth. There is a montage of Decepticons launching pillars into the air in the jungles of South America, Africa, Asia, and in cities like Tokyo. There are thousands of these pillars that will be launched into the atmosphere to make Sentinel's plan work. In Chicago, Sentinel gives the order for this all to proceed, and the Decepticons arrive in force to start shelling the various buildings of downtown Chicago, with most of the fighting taking place in the Loop and around the landmark buildings that face the river and the lake. Gould has Carly inside Trump Tower, and he explains to her that the Decepticons are going to use the 6 billion people of Earth as slaves to rebuild Cyberton with Earth's mineral resources. Gould tells her that he and the other collaborators have been helping so they can be kept as pets and not slaves, as this is the only way to survive. Gould wants Carly to be a pet with him and serve the Decepticons.
Sam and Epps try to contact as many NEST members as possible and get them to Chicago. Apparently, all of these people have the ability to travel great distances in mere seconds so they all assemble on Chicago's south side and attempt to storm the city, which Decepticons have made into a fortress. The US air force is trying to shoot missiles at the Decepticons, but there are anti-aircraft hover guns that shoot these and the planes down. NEST decides to send Lennox and other operatives into Chicago via parachute, since the Decepticons apparently can't pick up these chutes on radar. While Sam and the others try to make it to Trump Tower on foot, Lennox and his team parachute in. These guys use Willis Tower (which you know as Sears Tower) as a shield and avoid various flying Decepticons as they make their way to the ground. All manner of random Decepticons are shown smashing the buildings of Chicago, with giant Decepticon troop ships flying in the air along the river randomly blowing holes in the buildings for no reason.
Suddenly, all the pillars activate and Cybertron is teleported into Earth's atmosphere.
Sam is now in the Loop with Epps and the others and everyone figures out that they must destroy the southeast cupola of the Jewelers' Building for the Cybertron teleportation to end. The last hour of the film deals with various attempts to do this, with Sam, Epps, Carly, and Lennox being pummeled by various random Decepticons. Ultimately, the sandworm drilling Decepticon from Chernobyl that's controlled by ShockWave arrives and destroys a glass office building that Sam and Carly were in -- for about 20 minutes the building is collapsing on itself or teetering over the river with unnamed Decepticons trying to kill Sam and Carly, while Lennox is on the ground attempting to get a clear shot of the cupola where Sentinel's control pillar is located. Finally, Sam and Carly and various NEST agents slide down the side of the building to escape Decepticons and ultimately make it onto the ground. During this fight, Laserbeak is killed when Sam and Carly jump onto a Decepticon flying gun ship and hover outside the building for a while, during which time Bumblebee cuts Laserbeak's head off.
Lennox and his team climb to the top of the Tribune Tower and start shooting the eyes out of various Decepticons on the ground, who all shout "My eyes! I can't see!" as other NEST agents then plant explosives on the robots' feet to kill them. BumbleBee has been captured, and Sam and Carly are trying to find him in all the chaos of this battle.
On Michigan Avenue in front of the Wrigley Building, Soundwave and Starscream decide to execute Autobot prisoners, including an Autobot inventor named Wheeljack who was made to look like Albert Einstein. Sam and Carly need to rescue BumbleBee before he is killed too, and they create a diversion as the NEST snipers shoot more Decepticon eyes out.
Carly and Sam get separated again, with Carly eventually finding Megatron talking to himself in an alley while sitting on garbage dumpsters. She tells Megatron that he might be winning this battle but that in the end Sentinel Prime will be seen as the real winner, since it was his plan and when Cybertron gets there Sentinel will no longer need Megatron.
This makes Megatron jealous and he storms away to kill Sentinel.
Lennox and his team manage to shoot the southeastern cupola of the Jeweler's Building and disable the pillar that controls Cybertron's teleportation. When they do this, Cybertron disappears into space again. Sentinel then orders all Decepticons to fire on Autobots in the area so he can restart the teleporting. Gould gets to the pillar, which was completely undamanged, right as Sam makes it there himself. Gould and Sam fight, with Gould intending on restarting the teleportation. He pushes the button to start things up again and Cybertron appears once more above Earth, but then Sam pushes Gould into the pillar and he short-circuits it, killing Gould. Cybertron then implodes and is destroyed when all of the pillars stop operating and Earth is saved.
All of a sudden, magic blue lights appear above Chicago that zap all of the Decepticon ships and many random Decepticons up into the sky so they are destroyed along with Cybertron. Possibly this is all the Decepticon forces that were teleported from the moon to Earth, and when the pillars stopped operating anything that had been teleported got destroyed because the Decepticons where were not teleported are not affected.
Sentinel Prime and Optimus are having a fight on the State Street bridge over the Chicago River. They have a talk about Sentinel wanting to save their race and how the Transformers were gods on Cybertron but were treated as mere machines on Earth, and that humans should bow to them. Optimus tells Sentinel he is wrong but in the middle of the fight Megatron murders Sentinel.
Then Megatron and Optimus start fighting and within a minute or two Optimus pulls out a giant axe and cuts Megatron's head off. All sorts of nasty little spiders and flies pour out.
Chicago is in ruins and the Autobots and NEST agents celebrate the Decepticons being defeated. Sam and Carly hug each other, with Bumblebee watching them. Bumblebee then vomits little gears and bits of metal all over the ground, picking up a few pieces and giving them to Carly and Sam...before he starts playing wedding music. Sam tells Bumblebee to stop being so pushy and to let Carly and Sam's relationship continue without his prodding.
The credits start to roll...but are then stopped with a shot of Simmons, in a wheelchair, talking to Mearing on the roof of a building somewhere, reminding her of an affair the two of them shared years ago. Mearing tells the NSA agents to arrest Simmons for disrespected her, and Simmons smiles at her, and she smiles back.
The credits then continue again.
You can send in your spoiler to other movies by going here.