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 Lectitio Divinatus. Suitably embarrassed, the Emperor politely informed Lorgar to stop worshiping him the bullshit. By having the Ultramarines destroy a city the Word Bearers set up and then forcing Lorgar to bow down to Himself, Malcador the Sigillite, and Roboute Guilliman in front of his legion. Somewhat unsurprisingly In an unfathomable and completely impossible to predict act of Heresy, this would lead to Lorgar worshiping the Chaos Gods and starting the Horus Heresy. The Emperor, was not a good judge of character The Emprah, beloved by All, was saddened.
After the Emprah was hooked up to the Golden Throne, a "Cult of the Savior Emperor" (more often referred to as the "Imperial Cult", since every Imperial's a member) 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. The reformed Ecclesiarchy is still as corrupt and divorced from reality as it was before, but that's to be expected at this point.