If I were to use this, I think I would change the imprisoned being from a demon to an angel.
The reason the monks imprisoned it would stay the same, they wanted his angelic knowledge. They could have been evil monks looking for a way to defeat Good, or good (well, neutral probably) monks that are just after knowledge in general.
The angel kills the adventurer to get out, and then fights the other adventurers because it is either insane after a millenium of imprisonment, or because it truly did need someone to sacrifice themselves to get out, and the fight afterwards was just a reaction from the adventurers who were angered at losing a friend. After all, just because a being is "Good" does not mean they have are nice, and if the death of one person, or one adventuring party, means they can get back to fighting the Greater Evil, then so be it.
The best part of this is that all the standard powers and abilities (assuming a system like D&D) that the party has will be useless against an angel.