PETITION FOR WRIT OF HABEAS CORPUS l, the undersigned, say: I am the petitioner in this action. 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. To get a writ of habeas corpus, you must file a petition for a civil (not criminal) proceeding in either state or federal court. While involuntarily confined at ORANGE COUNTY HOSPITAL, Petitioner,. This manual explains how someone without a lawyer can file a petition for writ of habeas corpus in the California state courts. Please read this information sheet before you fill out Petition for Writ (Misdemeanor, Infraction, or Limited Civil. Case) (form APP-151). The Writ of Habeas Corpus is a legal defense against unlawful incarceration.