An application for a Writ of Habeas Corpus is filed when a person seeks relief from unlawful 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 state writ of habeas corpus is a legal document that allows people in state custody to challenge the legality or constitutionality of their detention. What Is Habeas Corpus? In both federal and Texas law, Writs of Habeas Corpus allow convicted individuals to introduce new evidence that wasn't at trial. In Texas, a writ of habeas corpus is a court order in which the judge demands a law enforcement agency to produce a detainee for a court hearing. 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 document that claims your freedom has been restricted (whether because you're in jail or on bond for a crime) The purpose of a Writ of Habeas Corpus is for the court to determine whether it has lawfully convicted and sentenced a person. The state writ of habeas corpus is a legal mechanism that allows individuals to challenge their detention or imprisonment.