The draconequus arrived in Equestria from another dimension during the First Generation. The discovery of the Elements of Harmony by Bright Eyes and their convergence in the newly founded Canterlot, along with the presence of the newly ascended first alicorns Princesses, unleashed the first burst of harmonic energy. Such harmonic magic needed a counterbalance of disharmony to keep the world in balance, and that counterbalance came in the form of the draconequus. Embodiments of disharmony, they exist to hold the world in balance and act against the embodiments of harmony. They are, in essence, the opposite of the alicorn. While the alicorn embodies harmony, the draconequus embodies disharmony. They are powerful creatures that can bend reality to their whims, and often take the role of tricksters and pranksters rather than antagonists. However, that playfulness came to an end shortly after their arrival in Equestria.
The Draconequus grew spiteful of the ponies who scorned them, especially the Princesses. The Draconequus Queen Hybris, the drconequus of hubris, declared war on Equestria. While the draconequus were powerful, the ponies outnumbered them and beat them back until their numbers dwindled. Eventually, in a last act of revenge, the gying Queen cursed Equestria with a terrible plague that eventually claimed the lives of the Princesses, leaving their heirs and the Elements of Harmony to scour the sickened land for the new Princesses, who they believed could hold the cure.
Of course, not all of the Draconequus died in the war. Many fled the plane altogether, like Cosmos, who placed herself in the sky as a constellation to wait out the war. However, one Draconequus remained in Equestria — the dying Hybris hid her only heir's egg deep in the Everfree forest, to one day hatch and bring back the Draconequus race.
Discord slumbered for centuries as the world changed around him, and when he hatched, hundreds of years had passed since the war. In fact, three whole Generations had passed, and he finally emerged from the Everfree at the end of the Third Generation, under the rule of the third alicorn Princess Triad — Bellaluna, Avalonia, and Forsythia. He promptly began causing chaos around the country, intending to take the throne for himself. Unable to defeat him, the Triad's three apprentices and the next Princesses (Celestia, Luna, and Amore), took the challenge and wielded the Elements of Harmony to banish him.
And, well. He got out! And came back to exact his revenge, and the new generation's Elements of Harmony defeated him again. But he's good now. Mostly. Kind of? He's working on it.