This story is a crossover between MLP and Alan Ituriel's Villainous.
Black Hat has been notorious for quite a lot of things over the course of his long lifespan, many of them rather diabolical. Considering this, he would likely not have anticipated that it was one of his more petty indulgences that would trip him up in the end. However, releasing a mocking ‘lost files’ video sassing an embodiment of chaos and disorder for his reformation at the hooves of pastel ponies was probably not the best idea. Then again, nobody had ever accused Black Hat of wisdom.
Discord, needless to say, was not best pleased by the horror’s razzing, and decided to take matters into his own claws. What Black Hat failed to take into account was that, while silly a lot of the time, Discord possessed fewer of the limitations keeping him in check, and a penchant for warping the existence of others.
So Black Hat scoffed at the notion of those pastel ponies? Why not make him dependent on their saccharine sweetness to feed? A changeling, after all, could hardly deny the value of love. The idea was quite appealing, and while Discord was now under expectation of not causing havoc for Equestria, someone from outside couldn’t possibly count, could they?
Discord seized Black Hat while the horror was asleep and drew him into the world of the pastel ponies he’d so mocked, altering and binding him into a new shape - that of a changeling egg, in a hive just far enough in the past that he thought he'd be able to enjoy the entertainment in the present without having to wait. He couldn’t make the change total, some aspects of Black Hat’s nature too intrinsic to remove, but he could make sure the new equid could not simply shrug off the change. Stranded in an entirely different life, Black Hat would need to learn how to live it.