A writ of habeas corpus is an order from a court to an official to produce an inmate. The writ of habeas corpus is the remedy to be used when any person is restrained in his liberty.To get a writ of habeas corpus, you must file a petition for a civil (not criminal) proceeding in either state or federal court. You should use this form if. Federal habeas corpus is a procedure under which a federal court may review the legality of an individual's incarceration. In this blog, we at The Blacknall Firm will break down the complexities of using habeas corpus in child custody disputes. Habeas Corpus: A remedy to have a child immediately returned from someone who does not have a right to possess the child. To obtain a writ of habeas corpus, you must show the court that you are in custody in violation of the Constitution or laws of the United States. The required application for a person currently incarcerated in TDCJ to file for a writ of habeas corpus under Texas Code of Criminal Procedure, Article 11.07. Velez Application for Writ of Habeas Corpus.