The inmate may file a petition for writ of habeas corpus. As discussed in § 6, state prisoners who want to file federal habeas petitions must first exhaust state judicial remedies.The Writ of Habeas Corpus protects prison inmates from false imprisonment to ensure people are not thrown into jail unlawfully. This following portions of this manual contain a step-by-step guide to California state habeas corpus process, including court forms and sample court pleadings. A federal writ of habeas corpus is a legal remedy available to state and federal prisoners who object to their detention or imprisonment. This petition must be clearly handwritten in ink or typed. You should exercise care to make sure all answers are true and correct. State courts may issue such writs to prisoner custodians to produce federal prisoners. Service. The issuing court will specify the party to execute the writ.