In the beginning, the land of Equestria was chaotic. The world was so rich with magic that day and night came and went with no rhyme or reason, and the seasons changed so quickly that it was impossible for civilization to gain a foothold. It wasn't until two powerful, sapient, equine sisters, capable of harnessing the very magic of the world itself, banded together the other magic harnessing equines of their world to combine their powers to bind the day, night and the seasons into a logical order. In exchange, many of the equines of the world sacrificed much of their ability to actually control magic for all future generations, despite becoming saturated with it.
Celestia, the sister with the power over light, became the queen of the day, while her younger sister, Luna, became the queen of night, and ruled over the dark hours. For a while, they were at peace. But Queen Luna became sour over the fact that the equines that they ruled over slept during the night she had worked so hard to maintain. Furious, she rose as Nightmare Moon, and forced the world into everlasting darkness. But six equines, using powerful artifacts known as the elements of harmony that were created alongside the binding of the days, fought alongside Celestia, and bound Nightmare Moon into the moon of their world, returning day and night to proper order.
Since then, the Kingdom of Equestria has become home to three special breeds of equines that resemble small, sapient ponies. Known as Earth Ponies, Pegusi and Unicorns, they have worked together for a thousand years in relative peace to create several self sufficient civilizations across their land as a result of magic and hard work. While their very existence is intertwined with magic to where they are inseparable, many, save for unicorns, are not specifically capable of magic due to how the magic of their world was bound. Yet all of these equines have been imbued with a special sort of magic unique to each of them, making them more proficient in one thing or another. This shows itself in a mark called a QT, or Quality Trait mark, symbolizing their specialty, that develops when they discover their special kind of magic.
For a long while, Nightmare Moon remained bound in the moon where she would become nothing more than an old filly's tale. But when the longest day of the thousandth year came around, the stars would aid to release her from her prison. When that day came, Nightmare Moon rose again. Just when all hope seemed lost and queen Celestia nowhere to be seen, six new heroes found the elements of harmony, to become the new Harmony Knights. They defeated Nightmare Moon, and purged Queen Luna of the hate that had overcome her.
But the hate and power that had made her Nightmare Moon was not so easily dispelled. The dark energy left Queen Luna, to disappear into the darkness of Everfree forest, where ever since it's been plotting to regain its rightful place, as the true ruler of Equestria. Yet now defended by the Harmony Knights, its minions have had a difficult time at it...