Habeas corpus is a kind of petition that you can file in federal court to claim that your imprisonment violates federal law. First, a U.S.C. § 2254 allows us to file a petition for Habeas Corpus when the client is in custody under sentence of a state court and is in a state prison.The writ of habeas corpus, or order to show cause, shall be directed to the person having custody of the person detained. All forms are ADA accessible, and you can handwrite or type into the PDF form to fill it out. Suggestions? Appellate Court Forms.