This is how The Story of Optimus Prime, Twilight Sparkle, and Megatron goes in One Shall Rise Part 3.
Ratchet: But, there was a time, back on Cybertron, in the twilight hours of the Golden age, when Optimus and Megatron were not sworn enemies. Do you recall when I mentioned that Optimus wasn’t always a Prime? Well, he wasn’t always Optimus either. He was once a clerk in the Iacon Hall of Records named Orion Pax. But as he learned more about Cybertron’s past, he grew increasingly concerned about the present corruption in high places and inequality among the masses. Orion became inspired by the words and ideas of a gladiator, one who had named himself after one of the thirteen original Primes – Megatronus. Megatronus vowed to challenge Cybertron’s leadership and demand that all Cybertronians be treated as equals. This gladiator turned revolutionary rapidly gained a loyal following. Soundwave, chief among them. Orion began corresponding with Megatronus, who came to be something of a mentor to him. As Megatronus left the gladiatorial arena for the political, he saw fit to shorten his name. Before long, Megatron appeared before the High Council to propose his vision for a just society. And it was here that he began to reveal his true colors. Proclaiming the need to overthrow the old guard with force and arrogantly demanding to be named the next Prime. But Orion did not believe in violence as a means of achieving justice. The sparks and minds of the Council were moved by Orion’s words. Here…for the first time since Cybertron’s Golden Age…stood someone worthy of being a Prime. But that honor could only be achieved by earning the legendary Matrix of Leadership. His ambitions thwarted, Megatron spitefully severed all ties with Orion and the Council, and came to wage war on all who opposed him through his growing army of followers which he named Decepticons. He vowed to claim the Matrix for himself wherever they might lie. In time, warfare consumed Cybertron, poisoning the planet to its core. Orion journeyed there, hoping to reverse the ill effects and found himself before the very spark of our life giver, Primus himself. The ailing Primus sensed the innatiability within Orion and bestowed the Matrix upon him. It was thus that a surprised and humbled Orion Pax came to be Optimus, the last of the Primes.
Starlight Glimmer: What about Twilight?
Trixie: Was she not always a princess?
Thorax: Was she not always Twilight?