Several thousand years ago (Stellar cycles), the planet Cybertron was consumed by a civil war between the two Transformer factions, the Autobots led by Optimus Prime and the Decepticons led by Megatron. Optimus jettisoned the AllSpark, an all-powerful mystical artifact that brings life to the planet and non-biological forms, into space, but Megatron pursued it in spaceship form. Megatron crashed onto Earth, landing in the Arctic Circle and froze, and was discovered in 1895 by explorer Captain Archibald Witwicky. Witwicky inadvertently activated Megatron's navigational system, which etched the Allspark's coordinates into his glasses. The glasses eventually end up in the possession of his great-great-grandson Sam.
In the present, a Decepticon named Blackout attacks and destroys a United States military base in Qatar in a failed attempt to hack the military network to find information on Project Iceman (a classified project linked to Megatron's whereabouts) and the AllSpark. A surviving team of Army Rangers led by Captain William Lennox escape across the desert, pursued by Blackout's drone Scorponok. They fight Scorponok off, aided by aerial reinforcements, and travel home with Scorponok's stinger, discovering sabot rounds damaged its armor. At the Pentagon, Secretary of Defense John Keller leads the investigation into the attack. Data analyst Maggie Madsen catches another Decepticon, Frenzy, hacking into the military network while onboard Air Force One. While the hack is thwarted, Frenzy downloads files on Archibald's glasses, tracking down Sam with Barricade, disguised as a Saleen S281 police car. Maggie makes a copy of the audio signal made during the hacking attempt and goes to her hacker friend Glen Whitmann to decode the signal, but they are promptly arrested by the FBI for having classified information.
Meanwhile, Sam buys his first car, a rusting 1976 Chevrolet Camaro, but discovers it has a life of its own. Sam and his high school crush Mikaela Banes are rescued from Barricade and Frenzy by the Camaro, who turns out to be the Autobot scout Bumblebee, who has to communicate through his car radio due to being mute. Bumblebee later scans a 2006 Camaro and transforms into a duplicate of it. Bumblebee takes Sam and Mikaela to meet Optimus Prime, Jazz, Ironhide, and Ratchet. Optimus explains that if Megatron gains the AllSpark, he will transform Earth's machinery into a new army and exterminate mankind. Sam, Mikaela, and the Autobots travel to Sam's house to retrieve the glasses, but they are captured by agents of Sector Seven, a top-secret paramilitary government branch which was founded by seven people, led by Agent Seymour Simmons. The Autobots stop the agents but they call for backup, who take Sam, Mikaela, and Bumblebee into custody, though Optimus obtains the glasses and uses them to locate the AllSpark.
The humans connected to the Transformers are gathered together at Hoover Dam by Sector Seven's director Tom Banachek, who reveals Megatron, still frozen and nicknamed N.B.E. 1 (Non-Biological Extraterrestrial) by Sector Seven, and the AllSpark. Simmons demonstrates the AllSpark's immeasurable mystical powers by transferring its energy to Glen's phone, turning it into a violent little Transformer, but is forced to kill it when it tries to escape. Frenzy, having smuggled away in Mikaela's bag and disguised himself as her phone, disables Megatron's cryonics system and contacts Starscream, Megatron's second-in-command and acting leader of the Decepticons, who in turn summons Blackout, Barricade, Brawl, and Bonecrusher. Bumblebee is released to protect the AllSpark, shrinking it to a handheld size so it can be transported to safety. Megatron escapes the dam after thawing out. Frenzy is decapitated by his own ricocheting shuriken in the ensuing battle as Keller, Maggie, Glen, and Simmons call for aerial support. Bumblebee reunites with the other Autobots as they head for Mission City with Barricade and Bonecrusher in pursuit. Optimus fights and kills Bonecrusher under some highway bridges.
A battle between the Autobots and Decepticons breaks out in Mission City, during which Jazz, Blackout, and Brawl are killed. Megatron prevents Sam's attempted escape with the AllSpark. Optimus arrives to protect Sam and engages in a battle against Megatron, with the latter getting the upper hand until Sam instead rams the AllSpark into Megatron's chest, destroying it and killing him.
Optimus salvages a fragment of the AllSpark from Megatron's mangled corpse. To cover up the existence of the Transformers, the United States government shuts down Sector Seven and disposes of the dead Decepticons in the Laurentian Abyss. Sam and Mikaela then start a romantic relationship while the Autobots secretly hide out on Earth, and Optimus sends a transmission into space inviting any surviving Autobots to join them.
A brief mid-credits scene shows Starscream escaping into space.
Shia LaBeouf as Sam Witwicky, the young descendant of an Arctic explorer who stumbles upon a big secret that becomes the Earth's last hope.
Josh Duhamel as Capt. William Lennox, the leader of the Army Rangers team in Qatar and allies himself with Sam.
Megan Fox as Mikaela Banes, a classmate of Sam who assists him in his mission by using skills she learned as a juvenile car thief from her convict father. She is also Sam's love interest.
Tyrese Gibson as TSgt. Robert Epps, a U.S. Air Force Combat Controller and technical sergeant of a Special Operations team based at the U.S. SOCCENT base in Qatar and Lennox’s best friend.
Rachael Taylor as Maggie Madsen, a former NSA data analyst recruited by the U.S. Defense Department.
Anthony Anderson as Glen Whitmann, Maggie's hacker friend.
John Turturro as Agt. Seymour Simmons, a member of the Sector 7 Advanced Research Division.
Jon Voight as John Keller, the U.S. Secretary of Defense.
Michael O'Neill as Tom Banachek, head of Sector 7.
Kevin Dunn as Ron Witwicky, Sam's father.
Julie White as Judy Witwicky, Sam's mother.
Amaury Nolasco as ACWO Jorge "Fig" Figueroa, a Special Operations soldier who survives the destruction of the SOCCENT base in Qatar and was also a member of Captain Lennox's team.
Zack Ward as First Sergeant Donnelly, a member of Captain Lennox's team.
W. Morgan Sheppard as Captain Archibald Witwicky, Sam's great-great-grandfather who accidentally activates Megatron's navigational system.
Bernie Mac as Bobby Bolivia, a used car salesman.
John Robinson as Miles Lancaster, Sam's best friend.
Travis Van Winkle as Trent DeMarco, Mikaela's ex-boyfriend.
Glenn Morshower as Colonel Sharp (credited as "SOCCENT sergeant")
Peter Cullen as Optimus Prime, the leader of the Autobots who transforms into a blue and red 1994 Peterbilt 379 semi-trailer truck. Cullen had previously voiced Optimus Prime in the original 1980s cartoon and was chosen to reprise his role, which was warmly welcomed by audiences and considered one of the film's best aspects.
Mark Ryan as Bumblebee, the Autobot scout and Sam's new guardian who transforms into a yellow and black Chevrolet Camaro (first a 1976 model and later in the movie a 2006 model).
Darius McCrary as Jazz, Optimus's second-in-command who transforms into a silver 2006 Pontiac Solstice.
Robert Foxworth as Ratchet, the Autobot medic who transforms into a yellow 2004 search and rescue Hummer H2 ambulance.
Jess Harnell as
Ironhide, the Autobot weapons expert who transforms into a black 2005 GMC Topkick C4500.
Barricade, the Decepticon scout and interrogator who transforms into a black Saleen S281 police car.
Hugo Weaving as Megatron, the leader of the Decepticons who transforms into a silver Cybertronian jet. Originally Frank Welker was considered to reprise his role but according to DVD commentary, Bay thought his voice didn't fit, so Weaving was chosen instead. Welker would later voice act in the sequels later on.
Jim Wood as Bonecrusher, the Decepticon mine sweeper who transforms into a Buffalo H Mine-Protected vehicle.
Reno Wilson as Frenzy, the Decepticon hacker and Barricade's minion, who transforms into a PGX Boombox, and later a Nokia 8800.
Charlie Adler as Starscream, Megatron's second-in-command who transforms into a Lockheed Martin F-22 Raptor. Adler had previously voiced several characters in the original series, most noticeably Silverbolt.
based on the Transformers toy line
the first installment in the live-action Transformers film series