This is extremely abridged, but my understanding is:
30,000 years into the future, humanity has spread throughout the galaxy with the help of AI. AI turns on them. Humanity is weakened, fractured into small colonies cut off from each other and their knowledge of technology fades over generations. Aliens, demons, and mutants take advantage of this and wage war. After rescuing and unifying several colonies, the Emperor founds the Imperium and begins his grand mission to reclaim the galaxy with the help of several legions of genetically-enhanced super-soldiers carrying his DNA.
10,000 years later (40K in total), the Emperor's legions themselves have fractured, some still serving the Imperium and others corrupted by trans-dimensional space voodoo. The Emperor is a vegetable being kept alive with the daily sacrifice of 1000 psychics, because his energy is required to power humanity's only method of warp travel. Though he didn't believe in religion during his time, the people of the present day worship what's left of him as God.
Zealots, space fascists, monsters, and giant shoulder pads. It's a vibe.