Ecclesiarchy
The Adeptus Ministorum, or Ecclesiarchy, is the state church of the Imperium of Man, making it the group which defines heresy.
When the Emperor of Mankind began setting up the Imperium, he began instituting the Imperial Truth, which basically said "there are no gods and we're doing science and reason now". Yet even during the Great Crusade people began worshiping the Emperor as a "God-Emperor", including his own son Lorgar, who wrote the Lictitio Divinatus. Suitably embarrassed, the Emperor told Lorgar to stop worshiping him. By having the Ultramarines destroy a city the Word Bearers set up. Somewhat unsurprisingly, this would lead to Lorgar worshiping the Chaos Gods and starting the Horus Heresy. Thus the civil war that has led to the entire setting being turned into a grimdark shitpit is due to the Emperor being an idiotic, intolerant cunt. Seriously, fuck you Throne Vegetable.
After the Emprah was hooked up to the Golden Throne, a "Cult of the Savior Emperor" was set up and eventually became the state religion as the Adeptus Ministorum. The Ecclesiarch, the head of the Ministorum, eventually got on the High Lords of Terra, eventually supplanting the Master of the Administratum as head of the Council, starting the Age of Apostasy. After that, the Ecclesiarchy started becoming what every powerful group in the Imperium does: more interested in its own power than the people they're supposed to be ministering to. Things took a major turn for the worse when Goge Vandire, the Master of the Administratum, became Ecclesiarch. Even by 40k standards this guy was nutters. After convincing a sect called the Daughters of the Emperor to become his bodyguards, the Space Marines and the Adeptus Mechanicus went "fuck this" and declared war on Vandire. To the Space Marines surprise, the Daughters not only held them off, but actually managed to give them a real beating. Before things got out of hand, the Adeptus Custodes took the leader of the Daughters to the Golden Throne. She got insanely pissed off by something that happened there and cut off Vandire's head.
After this, the Ecclesiarchy was stripped of all military power. Fortunately for them, they were specifically banned from keeping "men under arms", and so they reformed the Daughters into the Sisters of Battle of the Adepta Sororitas. The Inquisition also set the Ordo Hereticus to make sure no one deviated from these new rules.