The writ of habeas corpus is the remedy to be used when any person is restrained in his liberty. What Is Habeas Corpus?In Texas, the state writ of habeas corpus is a legal mechanism that allows individuals to challenge their detention or imprisonment. The purpose of a Writ of Habeas Corpus is for the court to determine whether it has lawfully convicted and sentenced a person. 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 an order from a court to an official to produce an inmate. 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 both federal and Texas law, Writs of Habeas Corpus allow convicted individuals to introduce new evidence that wasn't at trial. In both federal and Texas law, Writs of Habeas Corpus allow convicted individuals to introduce new evidence that wasn't at trial. It gives judges the power to require law enforcement to justify an arrest.