DETROIT — ONE of the members of our improv workshop, a baby-faced man in his 30s, made up a rule: The last person to arrive has to do a cartwheel. A shaggy-haired man with creaky knees manages a groaning little hop, while another wheels like a shot of light. In this fluorescent-lit classroom at the Macomb Correctional Facility in Michigan, it’s the willingness to take a risk that counts.

For three years, my friend Matt Erickson and I have led the improv theater workshop, sponsored by the University of Michigan’s Prison Creative Arts Project, at this medium-security state prison 30 miles outside Detroit. Improv is about freedom, and so there is a built-in challenge — and deep irony — in attempting to practice it in a prison.

On Thursday evenings, Matt and I sign in at the prison and then move through “the bubble” — a white room containing a metal detector, where we show identification, remove our shoes and are patted down by a corrections officer. We hook P.P.D.s — personal protection devices — into our pockets. The beige contraptions have a pin to pull in emergencies. We’ve never needed them, though once, during a game of “freeze,” the P.P.D. fell out of my pocket and went off when it hit the ground. Officers rushed to my aid and then rolled their eyes when I explained what had happened.

For an hour and a half, we guide our participants in games that prompt unscripted collaboration and play. We transport ourselves into a forest, a White Castle, a Transylvanian train. We imagine ourselves as prom queens and C.E.O.s.