In the worst-case scenario, you could lock him up in a prison and make the passage to the prison inaccessible. I haven't come up with any other solution yet.
It doesn't work that way. The map specifications include a list of heroes, and only heroes from the Inferno Castle are allowed for the first encounter, and heroes from the Fortress Castle are allowed for the second. Therefore, when choosing which hero to imprison, only heroes from these two castles are displayed.