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.What Is Habeas Corpus? 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. Essentially, a writ of habeas corpus is a legal means for any person who is restrained in his liberty to challenge an unlawful restraint. "Habeas corpus" is a Latin term that translates to "you shall have the body. A writ of habeas corpus is a powerful legal tool that allows individuals to challenge a criminal conviction or sentence. Please carefully read through all the steps listed below before you begin. A writ of habeas corpus is a legal tool used to enforce a superior right of possession to a child.