Credit goes to Wikipedia
On the planet Cybertron, the Autobot resistance, led by Optimus Prime, is on the verge of losing the civil war against the Decepticons, and prepares to evacuate. A Decepticon force, led by Starscream, Soundwave, and Shockwave, intercepts them during the evacuation, and Optimus sends the Autobot scout B-127 to Earth on an escape pod, in order to set up a base of operations where the Autobots can regroup. B-127 reaches Earth alone, crash-landing in California and disrupting a training exercise by Sector 7, a secret government agency that monitors extraterrestrial activity on Earth. Colonel Jack Burns presumes B-127 to be a hostile invader and pursues him. B-127 scans a Willys MB jeep and flees to a mine, where Blitzwing, a Decepticon Seeker, ambushes him. When B-127 refuses to reveal Optimus’s whereabouts, Blitzwing tears out his voice box and damages his memory core; despite this, B-127 stabs and destroys Blitzwing with one of his own missiles. B-127 flees from the soldiers, scans a nearby 1967 Volkswagen Beetle and collapses from his injuries.
In 1987, teenager Charlie Watson remains traumatized by the death of her father, and resentful of her mother Sally and her new boyfriend Ron. Charlie finds a yellow Volkswagen Beetle in a scrapyard belonging to Hank, who gives it to her as an 18th-birthday present. When trying to start it, Charlie unknowingly activates a homing signal that is detected by Decepticons Shatter and Dropkick as they interrogate and execute the Autobot Cliffjumper on one of Saturn’s moons. The Decepticons head to Earth, and acquire Earth vehicle forms. They meet Sector 7, pretending to be peacekeepers, and persuade them to help capture B-127, despite Burns’s objections.
While Charlie attempts to fix the Beetle, it transforms into B-127, whom she befriends and nicknames “Bumblebee”. She then unknowingly unlocks a message from Optimus urging Bumblebee to defend Earth in their absence, which restores some of his memories. They are discovered by Charlie’s neighbor Memo, who agrees to protect their secret due to his feelings for Charlie, and Bumblebee begins using songs from the radio to communicate. Left alone, Bumblebee accidentally destroys Charlie’s home and causes an energy spike that attracts Sector 7’s attention. When Sally blames Charlie for the destruction, Charlie finally expresses her pain over her father’s death and angrily leaves with Bumblebee and Memo, only to be intercepted by Sector 7 and the Decepticons. Bumblebee is captured while Charlie and Memo are returned home.
Charlie convinces her brother Otis to cover for her and Memo as they follow Burns to the Sector 7 outpost where Bumblebee is being held. Shatter and Dropkick torture Bumblebee and activate the message from Optimus Prime, discovering that the Autobots are coming to Earth. They shoot and leave Bumblebee for dead after revealing their plan to bring the rest of the Decepticons to Earth. After alerting Burns to the truth about the Decepticons, Dr. Powell is killed by Dropkick.
Charlie electroshocks Bumblebee back to life, restoring his memories, causing him to attack and drive off Burns’ obstruction. After escaping the pursuing military with the help of Memo and her family, Charlie and Bumblebee attempt to prevent the Decepticons from contacting Cybertron using a radio tower at a nearby harbor. Shatter shoots down Burns’ helicopter when he also tries to intervene, but he is saved by Bumblebee. Bumblebee binds Dropkick with a chain, and rips him apart when he transforms. Charlie deactivates the Decepticon beacon, only to be pursued by Shatter. Bumblebee destroys a dam wall, triggering a flood that causes a cargo ship to crush and destroy Shatter. Burns gives Bumblebee and Charlie time to escape before the army arrives. Charlie and Bumblebee arrive on a cliff overlooking the Golden Gate Bridge, where Charlie, realizing that Bumblebee has a greater purpose on Earth, says goodbye. Bumblebee takes on a new 1977 Chevrolet Camaro form and drives away, and Charlie reunites with her family and Memo.
Now using his new name, Bumblebee reunites with Optimus Prime, who praises Bumblebee for keeping Earth safe as they watch more Autobots arrive through Earth’s atmosphere. Meanwhile, Charlie finally finishes repairing the Corvette she and her father were working on, and takes it for a drive.