In an alternate timeline, Midnight Sparkle, once a timid Crystal Prep student by the name of Twilight Sparkle, defeated Sunset Shimmer in the climatic battle during the final event of the Friendship Games. With no one left to oppose her, Midnight Sparkle used the raw magic she had stolen to tear the human world apart, weakening the fabric of reality.
This resulted in both the human world and the pony world to collapse on eachother, permanently merging both worlds into one reality. This disasterous event caused a complete and total cultural collapse of both races. Animals and plants merged and some even became horrible abominations. The catastrophy even resulted in half the pony population replacing their human counterparts and vice versa, resulting in a mixed society of ponies and humans trying to adjust and survive in a world gone mad.
While the vast majority of each group remains 100% pony and human, the side-effect on some after the merging resulted in humans with pony minds and ponies with human minds. For others, the merging didn't complete properly and thus resulted in half human/pony hybrids (centaurs, satyrs, etc.).
Midnight Sparkle is the result of such a merging.
She merged with her pony counterpart and became a centaur alicorn similar to Tirek. With near-unlimited lust of knowledge and power, she rules with an iron fist, while tribes of ponies and human rebel against her and tyranny in an attempt to set things right.
MLP & Equestria Girls © Hasbro