The writ of habeas corpus is the remedy to be used when any person is restrained in his liberty. An application for a Writ of Habeas Corpus is filed when a person seeks relief from unlawful detention or imprisonment.Let's start with the basics. In United States law, habeas corpus is a recourse challenging the reasons or conditions of a person's confinement under color of law. Texas Constitution Article 1, Section 12: "The writ of habeas corpus is a writ of right, and shall never be suspended. The Privilege of the Writ of Habeas Corpus shall not be suspended, unless when in Cases of Rebellion or Invasion the public Safety may require it. The privilege of the writ of habeas corpus shall not be suspended, unless when in Cases of Rebellion or Invasion the public Safety may require it. The Legislature shall enact laws to render the remedy speedy and effectual. Any prisoner, or another person acting on their behalf, may petition the court, or a judge, for a writ of habeas corpus. A claim of no evidence can be raised on a writ application.