Contact an award-winning Writ of Habeas Corpus lawyer today. Petition for Writ of Habeas Corpus.If you want to challenge your immigration detention or other immigration related issues, you should use the form Petition for a Writ of Habeas Corpus under 28. 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. Any defendant who has been convicted of a New York state crime in a proceeding should be aware of their right to file a petition for a Writ of Habeas Corpus. To get a writ of habeas corpus, you must file a petition for a civil (not criminal) proceeding in either state or federal court. Public defenders can use these practice materials. For further Guidance Documents, Administrative Orders, Memos, Press Releases, etc. A writ of habeas is not going to accomplish the desired result. This online program from Family Legal Care guides you through filling out a Petition for a Writ of Habeas Corpus.