During the battle, technical genius Wheeljack used a device to warp space and time, teleporting a sun from across the galaxy into Cybertronic space.
Rather than sacrifice the sun as the legends claimed was required, however, Sentinel gambled that mere proximity to the star would be enough for the cube to re-energize itself... The All Spark was revitalized, and new life flooded into Cybertron as hostilities came to an end in the face of the truth that Sentinel had been right all along.
The All Spark then formed a key to activate the harvesters, the Matrix of Leadership, which the Dynasty protected.
As the millennia rolled by, the Transformers would form a new society, and the tales of the Primes and the All Spark would slip into legend.
The cube itself was forgotten, lost beneath the surface of the planet, and without a supply of energy regularly being harvested for it, Cybertron's energy began to diminish, leading to factionalization and tribal warfare amongst the Transformers.
Eventually, Prime made the decision to launch the All Spark blindly into space to put it beyond Megatron's reach.
At Optimus Prime's orders, Bumblebee and a group of Autobots served as decoys, drawing the Decepticons to Tyger Pax, far enough away from the artifact's true location to buy Prime the time needed to prepare the launch.
In truth, the physical All Spark is but a shell to contain the incredible life-giving energies within; should that shell be destroyed, the energies will remain, as potent as ever, merely waiting for a new vessel to inhabit.