It tests the legality of a detention or a restraint and the goal is to use it really almost i guess it's an emergency basis. Petition for Relief From a Conviction or Sentence By a Person in State Custody (Petition Under 28 U. S. C. § 2254 for a Writ of Habeas Corpus).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. Explain the grounds for the petition: You will need to explain why you are seeking a writ of habeas corpus. If you are looking to file a Texas 11.07 Writ of Habeas Corpus application, post-convcition lawyer Sarah Durham is here to help. 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. This petition, called a writ of Habeas Corpus, is filed in Federal Court (US District Court ) whether you are serving time in a federal or state prison. As an incarcerated person. WRAP-UP: Offer students at least a 3 min draft time for their homework (see below).