Just have the Dying Wise Man poisoned! Not an implausible circumstance; maybe he was fed a standard poisoned meal and left to die once his usefulness was over. Maybe it's a weakened version of a Potion of Poison or Burnt Other Fumes and he's got 30 health; just assume he rolls a failed save every turn. That's mildly DM-fiaty, but it sounds reasonable. Maybe he's even Exhausted as Someone_Evil suggested! That way he has disadvantage on those saving throws, if you want to roll it out.
The PCs probably will heal him, delaying the inevitable; maybe he even gives a bit more information if he has another turn to live, instead of dying in the middle of a crucial sentence. They probably won't realize he's poisoned unless you signal clearly that he is. Even if they do, what's the chance the Cleric has Neutralize Poison prepared? If you know the Cleric always has that prepared, this may not be a good strategy.
I was going to say "This may be a bit of a stretch in some circumstances," but it looks like this guy was already kept prisoner! He's stuck in a prison cell with no easy way in. Obviously PCs are going to try and find workarounds - Misty Step is hard to counter, and I can't think how you'd beat potion of healing+Familiar trickery+misty step). It's easier if there's only a hole in the wall instead of PCs being able to see him.
This is far more sketchy than the poison route - there are so many ways it could go wrong. Misty Step, Healing Word, Gaseous Form, Dimension Door, Clairvoyance plus any of the above... some PCs may even have methods of destroying solid rock, like Fabricate.
All of the above solutions are sort of odd. Why would this guy die the moment the PCs find him? What's the chance of that? It's almost like a DM with a sense of drama set it up that way, and he would have waited to die if the PCs stopped for the night and then continued...
So add someone who kills him! The moment the PCs arrive, guards continue their patrol - if this is outside the prison, maybe they're patrolling the outskirts of their territory; if it's inside the base, maybe they're patrolling the prison. Maybe they're just attracted from the nearby watchpost by the sound of voices and the sight of PC lanterns that shouldn't be there. They burst onto the scene and start attacking the PCs - and one with a dagger runs over and silences the prisoner in the middle of him leaking crucial information.
This is about as likely to fail as a prison trick - there are ways to counter it, like a canny PC running in and dashing or flying off while cackling at the ruin of your plot.
Someone knows that the Dying Wise Man is very wise and has campaign secrets. The PCs rescue him successfully - good for them! They heal him and run back to camp, and he gets out a few choice morsels of knowledge before he falls asleep. He's horribly, terribly tired. He'll sleep for the next 20 hours, and if anyone takes their eyes off him for a second... he's gone!
Any proper jailor takes hair and blood samples of every prisoner, and puts them in little boxes. Then, when one inevitably escapes (or the Undertaker Ogre doesn't find a corpse where there should be one), you hire Driftwood the Money-loving Wizard to Scry with his crystal ball and a blood sample. Invisible assassins arrive in the night (or day when everyone's distracted) and run off with him, either to kill him or to interrogate him about what he gave up.
The clever ones will leave a decoy in his place to feed the PCs false information until they realize they sense illusion magic on him. That way, they even doubt what he said at the start!