Petition for a Writ of Habeas Corpus under 28 USC § 2241. Form: PDF icon AO242.pdf.This Chapter explains the writ of habeas corpus and lays out the procedures you will need to follow to petition for the writ. The privilege of the writ of habeas corpus shall not be suspended, unless when in the case of rebellion or invasion the public safety may require it. The defendant then filed a pretrial writ of habeas corpus, arguing that the district magistrate court erred in finding a prima facie case. A habeas petition is used when one is contesting the validity of their sentence or conviction. District courts presented with a petition for writ of habeas corpus have the authority—indeed the obligation—to overturn the judgment of a state tribunal and. Federal habeas corpus is a procedure under which a federal court may review the legality of an individual's incarceration. Attorney Brian Zeiger can work to review the specific facts of your case and help you apply for habeas corpus through the federal judicial system. Habeas Corpus, in the Federal Court, is a petition that claims that you are being detained against your US constitutional rights.