Fill out the Petition for Writ of Habeas Corpus to Return Child. Habeas corpus refers to "a writ employed to bring a person before a court, most frequently to ensure that the person's imprisonment or detention is not illegal.A writ of habeas corpus is a legal document that claims your freedom has been restricted (whether because you're in jail or on bond for a crime) In Texas, 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. A writ of habeas corpus is a legal order that commands an individual or entity to produce a person who is allegedly being detained unlawfully. An application for a writ of habeas corpus asks a court to overturn your conviction because of a state or federal constitutional violation. An 11.07 writ, in its simplest terms, is a post-conviction vehicle for relief. Writ of Habeas Corpus.