Detective Jim Gordon’s (Ben McKenzie) past sins have come back to haunt him on Fox’s “Gotham” Season 2, and now the officer will spend time in prison. But just when it seemed Gordon was in a spot he couldn’t get out of, an old friend returned to help him in episode 16, titled “Prisoners.

The episode begins by showing Gordon adjusting to life in prison. Gordon has shown several months of good behavior, but Warden Carlson Grey (Ned Bellamy) decides to move him to the F-Wing, aka “World’s End.” The wing is filled with some of the worst inmates in the prison and many are people Gordon has locked up. The warden is an old friend of Commissioner Loeb’s (Peter Scolari), which is why he’s after Gordon.

Meanwhile, Penguin (Robin Lord Taylor) starts to settle in at the home of his real father, Elijah (Paul Reubens). Elijah reveals that Penguin is his only blood relative, as Grace’s (Melinda Clarke) children, Sasha (Kaley Ronayne) and Charles (Justin Mark), were from a prior marriage. This means if something were to happen to Elijah, Penguin would get everything, which Grace is not thrilled about. Elijah and Penguin talk later that night and Penguin tells him he has done bad things. Grace interrupts them to give Elijah heart medication, which she has been switching out with mints.

Back in the F-Wing, Gordon sees a lot of drug business going on and it looks like the warden has a hand in it. Grey tells one of the inmates, Weaver (Christian Frazier), he wants Gordon killed by the end of the week.

Bullock (Donal Logue) goes to visit Gordon and tells him he is looking into getting the case reopened. Gordon asks how Lee (Morena Baccarin) is doing because she stopped writing letters to him. Bullock breaks the news that Lee lost their baby and moved south, which shakes up Gordon.

When he goes back inside the jail, he gets jumped by a group of inmates. An inmate named Puck (Peter Mark Kendall) tries to stick up for Gordon because he thinks Gordon is a hero. Gordon warns him to stay away from him so he doesn’t get hurt. The warden then walks into the infirmary and prods Gordon about his dead baby. Gordon doesn’t take the bait, but says he knows the kind of man Grey is.

Penguin wakes up from a nightmare and finds his father sleepwalking. He walks Elijah back to bed and tells him all about his violent, murderous past. Elijah says their lives started when they met in the cemetery and he forgives Penguin for whatever he has done. He also tells Penguin that he has a hole is his heart, which is why he’s taking medicine.

The next day Grace shows Elijah a newspaper article that Charles found about Penguin being a criminal. Elijah is amazed at what a famous criminal Penguin was and says he already knew about his past, but knows Penguin is now a changed man. Grace then turns to Sasha for a “plan B” to get Penguin out. She tries to seduce Penguin, but it doesn’t work because Penguin says she’s practically his sister.

When Gordon gets back to the F-Wing, a group of inmates jump Puck again. Puck is beaten badly, while guards hold Gordon back from interfering. One of the guards, Bishop (Marc Damon Johnson), tells Gordon not to bite and to stay out of it while the warden watches.

While making a suit for Penguin, Elijah collapses. When the doctor comes, he tells Penguin the hole in Elijah’s heart has gotten bigger and he doesn’t have much time left. Elijah assures Penguin not to listen to doctors because he has proved them wrong before. Just in case, he asks Grace to contact his lawyer so he can get his affairs in order. Grace plans on turning to poison to get Penguin out of their lives.

At movie night in jail, Weaver goes to jump Gordon once again with a knife. Instead, another inmate cuts him off and appears to stab Gordon. As he lies on the floor, Bishop checks his pulse and notifies the warden that he’s “dead.”

It turns out it was all part of a plan to fake Gordon’s death. Bullock turned to Don Falcone for help, and Bullock shows up in an ambulance to get him out. Gordon hesitates, but agrees to escape only if they break Puck out too. Gordon goes back inside and helps Puck leave the infirmary, but he runs into the warden on the way out. Bishop then knocks the warden out from behind and allows them to escape.

While they sit down for a drink, Elijah tells Penguin he wants Penguin to have everything he has, including the money and the house. Elijah doesn’t normally drink, but he decides to that night. Grace slipped poison into the alcohol she put out for them, but her plan ends up backfiring. Before Penguin can drink, Elijah starts to choke on the alcohol and foam at the mouth. Penguin starts to cry as he holds his dying father.

Falcone had contacts inside Blackgate Prison, which allowed Gordon to escape. They meet Falcone on a bridge and he tells Gordon he can either leave the country or he’ll set up a safe place for him in Gotham. Gordon wants to clear his name and find Lee, but isn’t sure if he should run. He turns to Puck for advice, but Puck dies in the ambulance from his injuries. Gordon turns to face the city and it’s pretty clear he’s going back to Gotham.