The Horus Heresy is an event with seemingly many causes. The Emperor's ban on using psykers legally in the Imperium despite being one himself, The Primarch Lorgar's obsession with the emperor as a God despite the imperial truth, Fulgrim's Slaaneshi sword, Horus' temptation in a cave by Erebus, and much more. many actions by the Emperor had made the Primarchs uneasy, some felt as though just after being found they would be cast aside by the Emperor. In summary: All the Primarchs had their own grievances with the Emperor but Horus felt as though the Emperor had abandoned the great crusade and was giving power over the imperium to normal humans (The High Lords of Terra) until he was stabbed by a chaos knife by Erebus and was secretly nursed back to health by chaos cultists. Erebus entered Horus' mind while he was injured and showed him vision that the Emperor's secret project was to ascend into godhood and that Horus would be a better leader causing him to plot to overthrow the Emperor and he was possessed by the four Chaos gods.
Horus in his position as warmaster gathered other Primarchs to his side until half had fallen to chaos when he declared a rebellion against the Emperor thus dubbed the "Horus Heresy". Loyalist Primarchs were caught in the confusion and killed or seperated, some fled back to Terra with their Legions in order to defend it form Horus and his huge army as they moved to siege the capital of The Imperium. The Horus Heresy decimated the imperium, whole cities were lost and the once great technology was decimated. Many heroes were lost and gained but the imperium would never fully recover.
After many years in the Siege of Terra Horus, empowered by all four chaos Gods came face to face with the Emperor. Horus tore into the Emperor, attacking and slashing through his body until the Emperor was a bloody mess, chest agape. Dispite this the Emperor stood still enduring it, for it pained him to see his favorite son like this. Eventually when the Emperor was on the brink of death he took action. Instantaneously he destroyed Horus with a blast of warp energy dispelling and weakening the Gods who had inhabited him breaking the siege on Terra and allowing the loyalist Astartes to push the traitors back into the warp. Due to his injuries the Emperor was inurned inside of his webway project, meant to catch the thoughts of man from entering the warp, and it was used as life support, to which a thousand souls a day are sacrificed as he sits decaying on "The Golden Throne".