Prison AU

Prison AUs are a popular trope in fandom. They are often a way to let the characters meet for the first time in an environment where they have to depend on each other and where close proximity (often they are bunkmates) leads to more. True love goes hand in hand with long-term imprisonment. No matter what the crime was, there were probably extenuating circumstances or the characters really had a change of heart in prison and regret what they have done. 
Sometimes the characters are guilty, more often they were framed and had poor legal defense. The latter is most likely the case if only one of them is in there for a crime and the other is undercover. If they are both undercover, the prison AU can be a variant of the Undercover in a Gay Bar trope. 
==Fanwork Examples==
* Arcane Asylum - Modern AU in Merlin fandom. For the last twenty two years Uther Pendragon has been waging war on magic. Now his son Arthur has been framed for a magical crime and sent to the prison for magic users. Arthur is instantly targeted by the inmates, but mysterious top dog Merlin takes him under his wing. They form a bond, and Merlin decides to help Arthur clear his name.
*Hardened Criminal - X-Files AU. Mulder and Krycek do hard time in this story of captor and captive. 
*Crimes Against Humanity by Seperis - Stargate Atlantis AU where all the characters are criminals and Atlantis is a prison.
*Redemption - Uber novel in Xena fandom. It is set in a modern-day women's prison and tells the love story between the innocent Angel (UG) who serves a sentence for murder and the infamous repeat offender "Ice" (UX) who is drawn to Angel like a moth to a flame. 
* Prison Island Break - Sonic the Hedgehog fanfic.
* Behind Bars by Mia Athas. A Sentinel AU: Jim Ellison and Blair Sandburg meet in a different way.
* Never Leave A Trace by Sam Starbuck - a White Collar AU in which Neal is sent back to prison to uncover a fraud and Peter goes undercover as a prison guard, and magic is real.
* Different Road//Same Destination by Mizzy - gen Leverage AU with the team as prisoners and prison guards.
* Saiyuki Prison Break by Kaliane - gen Saiyuki fanart/wallpaper.
* Solitary and Confluence by louiselux - yaoi Saiyuki reincarnation fic; Oren (Gojyo) and James (Hakkai) meet again in prison.
* by usedupshiver: Everyone expects Tony to end up eaten alive sooner rather than later when he is put in the same cell as the Lyesmith, a man so dangerous even the members of his former gang are afraid to come after him. But sometimes it might actually be wise to just grin in the face of danger. (Loki/Tony Stark) (2015)
*Alice's Jasper, Edward's Bella by LyricalKris - a het Twilight AU. Bella volunteers to visit prison inmates and meets Jasper. 
*Peace, at the end of the day by kalirush - gen, Fullmetal Alchemist. Bystander fic. Roy goes to prison for his crimes in Ishval.
==Other Resources==
*Prison tag at Archive of Our Own
* Prison AU tag at FF.net
==Prison Trope in Canon==
Some fandoms have episodes that take place in prison. Stories based on these episodes are either explorations of canon or they are prison AUs.
* The Sentinel - Jim Ellison is sent undercover in a prison in the 3rd season episode Prisoner X. This inspired several fanfiction stories.
* Supernatural - Dean and Sam go undercover in a prison to hunt a vengeful spirit in season 2 episode Folsom Prison Blues, which inspired multiple fanworks
* Dream SMP - had the major Pandora's Vault prison arc in parts of season 3 and 4, as well as some other minor prisoners of war episodes early on.
Other shows are set entirely in prison. In these fandoms the Prison AU trope can be explored in a canon setting.
* Oz
* Prison Break
==Characters with a Past Criminal Record==
===In Canons Set in the "Real World"===
* Hardcastle and McCormick - Mark McCormick is a two-time ex-convict in the custody of former judge Milton Hardcastle. The canon makes frequent use of Mark's time in prison, and fanfic naturally runs with it, exploring his experiences in more depth, and sometimes more realistically, than was done in canon. A number of stories send him back to prison temporarily, usually either for an undercover job or as the result of a frame-up.
* House M.D. - as of Season 8, Gregory House is a convicted felon released on parole.
* Leverage - the whole team consists of criminals, but ironically only Nate Ford, originally the "one honest man", has canonically been imprisoned.
* White Collar - Neal Caffrey is a convicted con man, and the threat of sending him back to prison is a recurring element in stories exploring his relationship with Peter Burke.
===In Canons with Fantasy, Magical, or SF Elements===
* The main characters of Blake's 7 first meet on a prison ship.
* Farscape takes place on a living spaceship used as a prison (and itself imprisoned) until its prisoners took it over; many of the main characters (D'Argo, Zhaan, Rygel, Chiana, Stark) enter the series as prisoners or escaped prisoners.
* Guardians of the Galaxy: part of GotG Vol 1 (film) takes place in a Kyln prison.
* One Piece - nearly all main characters are pirates and therefore criminals. One long arc was set in the Marine prison Impel Down, where Ace and Jinbei were imprisoned.
*In Thor: The Dark World, Loki is incarcerated after being sentenced to life imprisonment by Odin.