Prisoners facing very serious punishment (being guilty of the crime is optional) are approached by a mysterious figure and offered their freedom, provided they do a little favor first. The mysterious figure is offering the pardon for a good reason, usually: he wants to tap into some highly-talented specialties, it is likely a Suicide Mission, and he needs a heaping helping of Plausible Deniability.
Expect to see "insurance" deployed, such as an Explosive Leash. If a lot of so-boxed crooks are assembled into a single unit, that may be the start of an Army of Thieves and Whores.
May stem from You All Meet in a Cell. Sub-Trope of Leonine Contract and Recruiting the Criminal. A related trope is Trading Bars for Stripes (your prison sentence is commuted to military service) and another is Recruited from the Gutter (working for someone who saved you from a crappy life). Compare Condemned Contestant, Indispensable Scoundrel, Trapped in Villainy, Forced Creativity, and Win Your Freedom. Specifically scientific examples fall under Doctor von Turncoat. Can overlap with Crazy Workplace if the jobs and/or the employees are very weird.
When the prisoner's end of the deal is to testify against their alleged accomplices who are separately offered the same deal, it's the Prisoner's Dilemma instead, but may overlap if testimony requires a mission to obtain proof, or if going free would actually be dangerous without a benevolent mentor.)