The Legion Wars, also known as the Slave Wars, was a series of major conflicts between the Traitor Legions in the Eye of Terror sometime in M31 (or not, given the fucked-up nature of time in the Eye).
Naturally, after their defeat at Terra and the Scouring driving them all to the Eye, the traitors were quite bitter and blamed each other for their failures. It didn't boil up to outright warfare until the Emperor's Children had run out of slaves to murderfuck in their rave-orgies and decided that raiding other legions for their slaves was the best way to solve this problem. They were successful at first, especially since they suffered the least in the siege of Terra, but eventually all the other legions teamed up and put those bitches in their place. Hard. So hard, that their numbers were reduced to less than that of a Chapter and wouldn't recover until the 13th Black Crusade.
During these wars, the World Eaters got splintered into small warbands and the Sons of Horus got raped (probably literally) when the Emperor's Children sacked Lupercalia, the Sons of Horus' new home planet, and stole Horus's corpse. This in turn caused Abaddon to leave his emo phase and start building the Black Legion from what remained of his own legion along with those he recruited from pretty much every other legion. The immediate blame game and random fighting for resources ended with the first big fight at the Battle of Skalathrax where Kharn shattered the World Eaters and the Emperor's Children into disparate forces that were mostly irrelevant except as mercenaries for the duration of the Legion Wars. The newborn Black Legion soon attacked the last major Emperor's Children base of operations and nuked it from orbit with a battlecruiser (by which I mean they THREW a battlecruiser at it), assaulted Fabulous Bile's laboratory ship in the Battle of Harmony, killed the clone of Horus, and declared Abaddon the new Warmaster of Chaos. After that, both the World Eaters and Emperor's Children slowly started gathering into groups and forming into proto-Warbands.
After this, the war changed from "Emperor's Children versus everyone else (with a side of everyone vs everyone)" to "Bow to the Despoiler and join his Black Crusades or get rekt". Some of the legions, like the Word Bearers and Iron Warriors, happily supported Abaddon's cause, while others like the Death Guard and the Emperor's Children resisted ferociously (some even claim Abaddon dueled and banished Fulgrim, though the EC were firmly shattered by this point and likely didn't offer any major organized resistance). Most of the chaos forces were split fighting for whatever side they feel like (or whatever side can afford to hire them, like in the case of the Thousand Sons), but in the end, the Black Legion and their supporters won after the death of Death Guard Sorcerer Lord Thagus Daravek (with his Legion Host disintegrating to be among the first disparate Warbands and some joining the Black Legion with the others raiding Segmentum Obscurus, these Warbands were quickly joined by World Eater, Emperor's Children and later other legion Warbands) and major in-fighting within the Legions in the Eye of Terror ceased besides regular old backstabbing or individual disputes (this is still far from actual peace, they still slaughter each other by the thousands when possible, especially between servants of rival gods or pre-heresy rivalries continuing).