A writ of habeas corpus refers to a court order that is issued to either an agency or a person who is holding someone in custody. Habeas corpus, which is Latin for "you may have the body," is a legal principle that protects against unlawful detention or imprisonment.A writ of habeas corpus is another means to fighting the legality of one's incarceration or proving actual innocence. The state writ of habeas corpus is a legal mechanism that allows individuals to challenge their detention or imprisonment. The writ of habeas corpus is the remedy to be used when any person is restrained in his liberty. The CIU handles all post-conviction reviews, writs of habeas corpus, Chapter 64 motions, and clemency and commutation petitions. The required application for a person currently incarcerated in TDCJ to file for a writ of habeas corpus under Texas Code of Criminal Procedure, Article 11.07. Essentially, it's a safeguard against unlawful or arbitrary detention. App.—San Antonio 1991, pet. Writs of habeas corpus are available to defendants who want to challenge their imprisonment.