The writ of habeas corpus is the remedy to be used when any person is restrained in his liberty. In Texas, the state writ of habeas corpus is a legal mechanism that allows individuals to challenge their detention or imprisonment.A writ of habeas corpus is a legal tool that a person can use to enforce a superior right of possession to a child. An application for a writ of habeas corpus asks a court to overturn your conviction because of a state or federal constitutional violation. Pretrial writs of habeas corpus may be used to challenge bail conditions or to raise issues that may prevent the trial from continuing. The CIU handles all post-conviction reviews, writs of habeas corpus, Chapter 64 motions, and clemency and commutation petitions. A Writ of Habeas Corpus (Latin for "that you have the body") may be filed on behalf of a person who is unlawfully imprisoned. (The district clerk of the county of conviction will fill in this blank.) IN THE COURT OF CRIMINAL APPEALS OF TEXAS. The writ of habeas corpus is used to attack an unlawful detention or illegal imprisonment. 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.