The Cybertronian Civil War was a major conflict fought between the Autobots and the Decepticons. The events of Transformers, Transformers: Revenge of the Fallen, Transformers: Dark of the Moon, Transformers: Age of Extinction and Transformers: The Last Knight all take place during the Cybertronian Civil War.
For generations, the inhabitants of Cybertron had lived in peace, under the joint leadership of the brothers Optimus Prime and Lord High Protector Megatron. While Megatron was firm, Prime was fair, and the two personalities created a balance. That changed, however, when Megatron sought the All Spark, which gave life to all Transformers. He raised an army, the Decepticons, who sought the All Spark to give them the power to conquer other worlds. To counter Megatron, Prime raised his own army, the Autobots. Although the Autobots fought bravely, the Decepticons were the more ferocious warriors, and Megatron began to gain ground. In a desperate move, Prime sent the All Spark into deep space, and Megatron pursued it. Both crashed on Earth, and disappeared for many years. The war became a search for the All Spark, with the Decepticons, led by Starscream, searching for both the All Spark and Megatron.