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 used to enforce a superior right of possession to a child. The purpose of a Writ of Habeas Corpus is for the court to determine whether it has lawfully convicted and sentenced a person. Please carefully read through all the steps listed below before you begin. A writ of habeas corpus is a legal tool that a person can use to enforce a superior right of possession to a child. By filing a writ of habeas corpus, defendants may be able to overturn convictions or obtain relief from lengthy sentences. An application for a Writ of Habeas Corpus is filed when a person seeks relief from unlawful detention or imprisonment. (The district clerk of the county of conviction will fill in this blank.) IN THE COURT OF CRIMINAL APPEALS OF TEXAS. If your answer is "Yes," complete Question 11 above regarding your parole revocation.