Unless your hero's enemies are all intensely stupid, he and his companions will be totally unarmed, and will have been carefully searched for anything valuable. Really, unless your goblins are nobler than those in most stories, readers will expect goblins to take everything from their captives. Your hero can't pull a lockpick or a poisoned pin from the seam of his coat or sole of his shoe, because he has no coat and no shoe. He's wearing goblin rags (if that). So, that's your hero's big problem. You've put him in a corner with no way out.
Or does he? Your hero's bad situation is also your hero's opportunity. His enemies assume he is now helpless. Naturally, being lazy goblins, they're not going to guard him too closely. Now is the time to reveal that he soaks his hair in poison, or that he knows a couple magic spells, or can talk to moths (!), or can control weak minds (especially drunken ones). Or has a pixie in one lung. (THAT's why he's been short of breath!) Perhaps also now would be the proper time for him to tell his companions that he PLANNED all along to get caught, because that was the only way to get to the Goblin King, and that he is, in fact, a walking time-bomb.
The problem for you, the writer, is to put a twist on this age-old formula. In real life, of course, the hero would just die. That's often how RL is: good people die, ignominiously and needlessly, for no good end. The bad guys win. But that makes for a lousy story, unless your story has multiple heroes so that one or more is expendable. Assuming you don't want to kill off this guy, you have to think of a way to save him that readers won't expect but also won't reject. You both need and don't want a Deus ex machina. So, after you've saved your hero with this totally unexpected twist, you have to go back (like Mac Cooper said) and set it up in the earlier part of the story.