"Our planet was once a powerful empire, peaceful and just. Until we were betrayed by Megatron, leader of the Decepticons. All that defied them were destroyed. Our war finally consumed the planet and the Allspark was lost in the stars. Megatron followed it to earth where Captain Whitwicky found him."
Optimus Prime tells the story of Megatron's betrayal to the Autobots.