In the 2007 film
Sector Seven agent Seymour Simmons explained that the AllSpark was found in 1913, 16 years after the N.B.E.-01 "Iceman" was found, though carbon dating tests indicated that Cube landed on Earth some twelve thousand years earlier. The glyphs on the Cube were similar to the ones on the Iceman, indicating a link between the two. In order to hide the cube's energy signature from other humans and, potentially, from other N.B.E.s, the President had the Hoover Dam built around it. The Iceman was also moved to the dam for further study. It was eventually determined that the Cube emitted a radiation which could bring mechanical devices to life.
Without the AllSpark, Cybertron itself began to atrophy, becoming an uninhabitable world. The Autobots and Decepticons abandoned their planet and took to the stars, searching for the lost AllSpark, the Autobots hoping to use its power to restore their dead homeworld, the Decepticon seeking its power to animate the machines of other planets to build an army. Bumblebee succeeded in tracking the cube to Earth, and the rest of the Autobots arrived there in 2007, and allied themselves with Captain Witwicky's great-grandson, Sam Witwicky. Together, they traced the cube to its hiding place in the Hoover Dam, inadvertently revealing its location to the Decepticon spy Frenzy, who summoned the other Decepticons and deactivated the systems keeping Megatron in cryo-stasis, bringing him back online. To get the AllSpark to safety, Bumblebee interacted with the cube and somehow prompted it to collapse from an enormous monolith into an object less than half a meter across, and accordingly lesser in mass as well as volume.
he AllSpark was quickly taken to nearby Mission City, where Sam was instructed to take it to the top of the highest building for evac. Stumbling as he ran, Sam fell and struck the AllSpark on the ground, causing it to release a wave of energon radiation which brought several nearby machines to life. Upon reaching the top of the building, Sam was confronted by Megatron, but refused to turn the cube over to him, and was sent toppling from the building. Optimus Prime came to his rescue, and during the battle that followed between Prime and Megatron, the Autobot leader told Sam to merge the AllSpark with his spark in order to destroy it. However, Sam instead merged it with Megatron's spark, destroying both the Decepticon leader and the AllSpark. Only a single fragment of the cube appeared to remain, which Prime plucked from Megatron's dead body. Without the AllSpark, the Autobots had no means to restore their homeworld, and so elected to remain on Earth. Prime sent a message to inform the surviving Autobots of their new found home.
In Revenge of the Fallen
In 2009, Decepticon spymaster Soundwave discovered that the surviving AllSpark fragment was being kept on Diego Garcia after hacking into a communication broadcast between NEST and General Morshower. Soundwave dispatched Ravage and Reedman to retrieve the fragment, and it was subsequently used by Scalpel to resurrect Megatron from the bottom of the Laurentian Abyss.
However, unbeknownst to anyone, the shard in NEST's custody was not the only surviving piece of the AllSpark. When Sam Witwicky began packing for Princeton University, a sliver of the cube was revealed to have become embedded in his shirt during the battle of Mission City, and upon touching it, Sam's mind was flooded with Cyberglyphics. As The Fallen would go on to explain, the AllSpark cube itself was merely a vessel for the knowledge within, and Sam had absorbed that knowledge upon the cube's destruction, which was now released into his mind upon contact with its remains. Sam dropped the sliver in shock, and it burned its way through his bedroom floor, falling into the kitchen below where it released a wave of Energon that brought the Appliancebots to life. With this more immediate threat to deal with, Sam did not realize the full extent of what the AllSpark had done to his mind until his disastrous first day of class, during which he began uncontrollably babbling the specifics of the fantastic science of the Transformers to the shock and ridicule of his classmates and professor. He called upon Mikaela to bring the fragment to him, but no sooner had she arrived than Sam became targeted by the Decepticons, who desired the AllSpark knowledge in his brain to lead them to the hidden star harvester on Earth. Optimus Prime died saving Sam, and Sam, believing that the energy of the Matrix of Leadership could be used to resurrect Prime, sought out one of the Decepticon Seekers to translate the symbols he was seeing in hopes of finding a clue to its location. The Seeker they found was Jetfire, who was slumbering in the Smithsonian, and they used the AllSpark sliver to reactivate him. Although borderline senile, the ancient Seeker was able to translate the symbols Sam into a riddle that pointed the way to the Matrix's hiding place.