With deadlines jeopardized by possible strikes by the Directors Guild of America and the Screen Actors Guild, Bay managed to finish the production on time with the help of previsualization and a scriptment by his writers Roberto Orci, Alex Kurtzman, and series newcomer Ehren Kruger. Shooting took place from May to November 2008, with locations in Egypt, Jordan, Pennsylvania and California, as well as air bases in New Mexico and Arizona.
Revenge of The Fallen was released on June 24, 2009, and was a huge box office success, setting records upon release, and grossing a total of $402 million in North America and $836 million worldwide. It was the second most successful film of 2009 (behind Avatar) and 12th overall domestically, and the 28th highest-grossing film of all time and fourth highest of the year (behind Avatar, Harry Potter and the Half-Blood Prince, and Ice Age: Dawn of the Dinosaurs) internationally. Despite its success at the box office, the film was received poorly by critics, and won three awards at the 30th Golden Raspberry Awards ceremony, including Worst Picture. A third film, Transformers: Dark of the Moon, was released on June 29, 2011, in 3-D.
Thousands of years ago, the Dynasty of Primes traveled the galaxy to create Energon with sun-absorbing machines called Sun Harvesters. The Dynasty follow a law that no sun can be destroyed if it has life on one of its planets. However, one of the Primes broke this law by setting up a Harvester on Earth in 17,000 B.C. The rest of the Dynasty named him The Fallen, and sacrificed themselves to hide the "Matrix of Leadership", the key to start the Harvester.
Two years after the events of the first film, Sam Witwicky is going to college, and the Autobots have joined the U.S military to create a classifed team, NEST (Network Elements: Supporters and Transformers), an elite joint military organization from the United Kingdom and the United States, selected from the world's top elite soldiers led by Optimus Prime, Major William Lennox and General Morshower, to eradicate Decepticons from all over the globe. While packing for college, Sam finds a shard of the AllSpark, which "uploads" its Cybertronian knowledge into Sam's mind. Sam gives the shard to his girlfriend Mikaela Banes for safekeeping, and leaves his guardian Bumblebee behind.
In Shanghai, the NEST Team encounters Demolishor and Sideways. Sideswipe and Optimus take down Demolishor and Sideways, but bring damage and destruction to the public. Demolishor warns Optimus of The Fallen's return before his execution. Reporting to NEST's base in Diego Garcia, the Autobots are patronized by U.S. National Security Advisor Galloway for their actions in Shanghai. Soundwave, the Decepticon's communications officer, hacks into a U.S military satellite, and overhears both the location of Megatron's corpse and the Allspark shard that Optimus removed from Megatron in the first film. After Ravage retrieves the Allspark's shard, it is used to resurrect Megatron's corpse at the Laurentian Abyss. Megatron then flies to the Decepticon flagship Nemesis, where The Fallen instructs him to kill Optimus and capture Sam, as Sam has knowledge that can lead the Decepticons to the Matrix of Leadership.
In college, Sam meets his roommate Leo Spitz, who owns a conspiracy website related to the Transformers' existence. Sam eventually starts seeing and scribbling visions of Cybertronian symbols and having a mental breakdown. At Mikaela's shop, Wheelie tries to steal the shard, but Mikaela captures him and leaves to see Sam in Princeton. She arrives just as Sam is attacked by the Pretender Alice. Mikaela, Sam and Leo flee and eventually kill Alice, but are then captured by the Decepticon Grindor, who drops them off in an abandoned warehouse. The Decepticons brutally torture Sam to obtain the whereabouts of the Matrix, but the only way to find it is to cut his head off to get to his brain. Optimus and Bumblebee arrive and battle the Decepticons, with Optimus taking Sam into a forest where the Decepticons battle him. Optimus is badly wounded but manages to kill Grindor and wound Starscream by ripping his arm off, before Optimus is killed by Megatron. The humans flee with Bumblebee and the Autobot twins, Skids and Mudflap. The NEST team, shocked by their loss, brings Optimus' body to their New Jersey base. Galloway arrives with the news that NEST is being decommissioned after the arrival of the Decepticons.
Meanwhile, the Decepticons kidnap Sam's parents in Paris. The Fallen taps into media signals and broadcasts a demand that the people of Earth deliver Sam to the Decepticons or be annihilated. Leo suggests to Sam that his online rival "RoboWarrior" may be able to help. When the trio find him, they discover that RoboWarrior is actually Agent Simmons from the now defunct Sector Seven. Simmons reveals that the Transformers have been on Earth for millennia and convinces Wheelie to reveal a group of Transformers known as the Seekers. They find and revive the elderly Jetfire. Originally a Decepticon, Jetfire reveals to have changed sides to the Autobots, and teleports the group to Egypt.
Following several clues, the trio find the Tomb of the Primes in Petra. When Sam touches the Matrix it crumbles to dust, but Sam puts the sand in a pouch. The Decepticons arrive and battle the Autobots and NEST, who are aided by the United States Marine Corps, Egyptian and Jordanian military forces. The Constructicons Devastator uncovers the Sun Harvester from a pyramid but is killed by a railgun strike ordered by Simmons. Epps orders an air strike from F-16s, A-10s, and a B-1 Lancer, taking out all of the Decepticons. Sam makes a dash for Optimus Prime's body, but is shot and killed by Megatron before the Decepticon is overwhelmed and flees. Before dying, in limbo, Sam is told by the Dynasty of the Primes that the Matrix of Leadership is not a physical item to be found, but a right that he has earned.
Sam is resurrected from the dead, and when the Matrix reforms itself from the sand in his pouch, he resurrects Optimus. The Fallen then teleports, grabs the Matrix and flies to activate the Sun Harvester. After an attack by their artillery and air support fails due to The Fallen's telekinesis, Jetfire offers his parts to Optimus before dying of wounds inflicted by Scorponok. Using a battle armor made with Jetfire's remains, Optimus destroys the Harvester, defeats Megatron and kills The Fallen. Megatron, who has been severely damaged in the battle, follows Starscream's suggestion and retreats. The Autobots, NEST, Sam, and his friends return to the US, where Sam continues to attend college.
- Shia LaBeouf as Sam Witwicky
- Megan Fox as Mikaela Banes
- Josh Duhamel as U.S. Army Major William Lennox
- Tyrese Gibson as USAF Master Sergeant Robert Epps
- John Turturro as Seymour Simmons
- Ramón Rodríguez as Leo Spitz
- Kevin Dunn as Ron Witwicky
- Julie White as Judy Witwicky
- Isabel Lucas as Alice
- John Benjamin Hickey as Theodore Galloway
- Glenn Morshower as USMC General Morshower
- Matthew Marsden as SASF Agent Graham
- Rainn Wilson as Professor Colan
- Jonathon Trent as Fassbinder
- Walker Howard as Sharsky
- Annie Korzen as Tova Simmons
- Peter Cullen as Optimus Prime
- Mark Ryan as Jetfire/Bumblebee
- Reno Wilson as Mudflap
- Jess Harnell as Ironhide
- Robert Foxworth as Ratchet
- André Sogliuzzo as Sideswipe
- Grey DeLisle as Arcee/Chromia/Elita-One
- Tom Kenny as Wheelie/Skids
- Michael York as Prime #1
- Kevin Michael Richardson as Prime #2
- Robin Atkin Downes as Prime #3
- Hugo Weaving as Megatron
- Tony Todd as The Fallen
- Charlie Adler as Starscream
- Frank Welker as Soundwave/Devastator/Reedman/Grindor/Ravage
- Calvin Wimmer as Demolishor (credited as "Wheelbot")
- John DiCrosta as Scalpel
- Kevin Michael Richardson as Rampage (credited as "Skipjack")
- Long Haul
- Scalpel's assistants
- Buffalo MPV Decepticon