The adventurers have gotten themselves captured, all part of the plan for their next quest.
There are some old records they need that are located in the archives of the prison, but getting to them won’t be easy. They’ll have to somehow break out out of their cells, save one of their fellow party members who has been locked in solitary and probably help another innocent prisoner escape.