On TV Tropes this is called Evil Is Not a Toy:
Sometimes the Sealed Evil in a Can doesn't escape by itself, nor is it released by an Unwitting Pawn, but is deliberately set free by a villain (or hero). Let's call him Bob. Bob usually thinks he can control the sealed evil, or bargain with it, expecting to trade on a certain level of gratitude on its part since he was the one who freed it (or in extreme cases, resurrected it).
This never works.
The Sealed Evil in a Can will inevitably turn on the one who freed it — sometimes sooner, sometimes later. In many cases, it turns out to have no understanding of loyalty or gratitude at all. Bob may end up being killed on the spot, or he may be enslaved by the sealed evil
In any case, if Bob was the Big Bad before, he was really just a Little Bad; the formerly-sealed evil is the true Big Bad.
There is also Eat The Summoner, which fits very closely to the title of this question:
Alice is a Sealed Evil in a Can. Bob, either because he was promised something like immortality or riches, thinks he can control her, or because he thinks Alice isn't as evil as everyone says she is, tries to free her. After a bit of hard work, and possibly some outmaneuvering of people with more common sense, Bob frees Alice. However, rather than rewarding Bob for his service or even giving him a simple thank you, Alice tosses Bob into her mouth and eats him without a second thought.