The writ of habeas corpus is the remedy to be used when any person is restrained in his liberty. What Is Habeas Corpus?Habeas corpus is a legal rule that requires a prisoner be presented in court and that the arrester prove that there is proper cause for detaining the prisoner. In Texas, the state writ of habeas corpus is a legal mechanism that allows individuals to challenge their detention or imprisonment. An application for a writ of habeas corpus asks a court to overturn your conviction because of a state or federal constitutional violation. A writ of habeas corpus is a legal tool used to enforce a superior right of possession to a child. Its main purpose is to protect citizens from governments overreaching their power to incarcerate people. A writ of habeas corpus requires that a person who is in custody be brought before a judge or court and that they be able to challenge that custody. A writ of habeas corpus is a legal tool that a person can use to enforce a superior right of possession to a child. In the state of Texas, applying for a writ of habeas corpus is one way to overturn a state conviction due to a state or federal constitutional violation.