Cybertronian Civil War

Almost all continuities share at least one thing in common: a Cybertron wracked with civil war.

"Millions of years ago, Cybertron was a planet of peace...until the Decepticons, lusting for power, began a terrible war. Not designed for combat, the Autobots were overwhelmed and subjugated by their evil opponents. While many Autobots fled Cybertron, a few valiant survivors devised new tactics and launched a counter-offensive on their arch-foes. And thus began a terrible series of wars. Many times, both sides have claimed victory, but this has been short-lived, for the Autobots have overthrown Decepticon tyrants, and, likewise, Decepticon treachery has toppled many a peaceful Autobot ruler. And to this day, the war rages on."

- Computer

G1 cartoon continuity
It is unknown if there were any planetary civil wars among the Quintessons while they controlled Cybertron (although there was certainly crime and punishment). The first known war was the robot slave revolt around 11 million years BCE. The Quintessons had built Cybertron as a factory to produce two types of slave robots: military hardware and consumer goods. For a million years, the Quintessons maintained control, but when the robots began to develop emotions, they turned on their cruel Quintesson masters.

Interestingly enough, the first revolt was carried out by a band of non-warrior robots (workers, scientists, and technicians). They were led by a slave called A3, who somehow possessed a secret weapon called a Coda Remote, and Beta, the acting leader of the revolutionaries. Beta decided to lead the attack on Hive City (which the Quintesssons had built with slave labor) with or without A3. The attack went well at first, but the motley band of freedom fighters soon proved to be no match for the Quintessons' many Dark Guardians. Suddenly, however, A3 used his Coda Remote, which was activated when he removed his slave brand and turned its reverse side to the Dark Guardians. It emitted a wide beam of light that caused the giant robots to stop in their tracks and fall down.

After the slaves drove the Quintessons away from Cybertron, peace reigned. However, the division between consumer goods and military hardware was becoming acute, as the two groups had even named themselves differently: The consumer goods robots called themselves Autobots, and the military hardware robots were known as Decepticons. While the Autobots preferred a peaceful existence, the Decepticons wanted conquest. For a time, the Decepticons succeeded.

The Matrix was already in existence at this point, apparently being passed from one Autobot leader to the next, as is the practice today.

The Autobots couldn't match the brute strength of the Decepticons, so they turned to stealth, learning the art of transformation. Using this new technology, they defeated the Decepticons and ruled for many centuries in a "Golden Age." Peace was kept with the use of Guardian robots (presumably based upon the Quintessons' Dark Guardians), sentinels that protected cities, quelled uprisings, and generally did the dirty work of war. However, the Decepticons eventually learned to transform and also developed some form of anti-gravity that allowed them to fly without the use of jets. They also built a powerful leader for themselves: Megatron.

Thus, circa 9 million years BCE, the war began anew. Megatron led his army from victory to victory, targeting mainly power centers to fuel his troops and build his forces. While the Guardian robots were powerful enough to strike fear in the Decepticons, even those giants were suffering at Megatron's hands. Even the safety of the Matrix was in question, so Alpha Trion (formerly known as A3) kept it in hiding for many years. It was to this time of violent flux that the newly created Aerialbots were accidentally sent from the year 1986.

They soon met a young, energetic worker at an energy-shipment facility. This robot, Orion Pax, was in awe of the Decepticons, but his feelings changed when Megatron attacked his workplace and gravely wounded him, his girlfriend Ariel, and his friend Dion. The Aerialbots took Orion to Alpha Trion, who was devising new ways to combat the Decepticons. Alpha Trion rebuilt Orion into Optimus Prime, the first of a "new breed" capable of fighting Megatron. He also rebuilt Ariel into Elita One, but it is unknown if Dion got similar treatment.

At some point, Prime was named leader of the Autobots, and Alpha Trion gave him the Matrix. (This may have been when he was first created; the timeline is uncertain. There's even confusion about when Alpha Trion acquired the Matrix in the first place; when he is seen taking it, he looks older than he did when he built Prime.) For the next five million years, the war raged on, draining Cybertron of its resources. Even the buildings and landscapes, which used to glow with radiant energy, became dull and barren. In search of new energy sources, Optimus Prime led a team of Autobots on an interplanetary expedition that ended when Megatron attacked and boarded their ship. As the Autobots and Decepticons fought, the ship strayed too close to the nearby planet Earth, and the resulting crash and rendered them all catatonic.

For the next four million years, Shockwave commanded the Decepticons on Cybertron, who maintained the upper hand. When the Earth-bound Transformers were revived in 1984, Megatron schemed to harness Earth's resources and send the energy to Cybertron. With the invention of the space bridge, interplanetary travel became very easy, and Megatron's plans came closer to fruition.