The Emperor of Mankind was created long ago in pre-historical times. In those times, humanity’s tribes were led by shamans with “magical powers”, what we would today call psykers. These shamans were reincarnated when they died, thus their accumulated knowledge from many lives allowed them to lead humanity. Unfortunately, the presence of chaos in the warp/realm of souls was getting stronger, and the shamans could not reincarnate, as their souls were being consumed by daemons in the warp after their deaths. They planned a ritual suicide to solve this problem and create a new leader for mankind. They all died at one time, and their souls melted together in the warp. This soul was far too powerful for the daemons to consume, and was born in a being we know as the emperor. The emperor has enormous, even god-like psychic and physical prowess, traits that would eventually lead to his downfall.
After the Age of Strife, the Emperor conquered Earth. At this point, humans were scattered across the galaxy, inhabiting thousands of worlds. The Emperor knew he had to unite all of mankind in a glorious empire. He created his sons, the primarchs, and legions of superhuman warriors known as space marines to spearhead his great crusade.
While his vision for an empire founded on reason in which all humans could prosper was noble, he was also very authoritarian. Any humans he thought deviated from the form of humanity (mutants, abhumans, etc) were ruthlessly discriminated against or even purged from existence. Ideals that conflicted his own, notably religion, were strictly outlawed, and many worlds burned because their people did not fit into the definition of what the empire considered acceptable. This attitude later came to haunt him with an event called the Horus Heresy, in which half of his sons rebelled against him. This event eft the imperium divided, with half the original space marines and primarchs now residing in the eye of terror in service to the dark gods of chaos. In the culmination of the war, the emperor was mortally wounded. He now languishes on a life support device called the Golden Throne, which keeps his psyche alive at the cost of 1000 souls every day.
As he can no longer communicate with his subordinates, the Imperium has become the exact opposite of his dream, a fanatically religious authoritarian regime that shuns advancement or reason. Today he is, ironically the god and central figure of the religion of the imperium of man, a fate he detested more than anything.