The inmate may file a petition for writ of habeas corpus. A writ of habeas corpus petition is a tool that individuals convicted of criminal offenses in California can use to challenge their imprisonment.How Do I Fill Out the Form? There is an official form (Judicial Council Form HC-001) for filing a state petition for writ of habeas corpus. A petition for writ of habeas corpus is a legal action that allows individuals to challenge their unlawful imprisonment or restraint. The Writ of Habeas Corpus protects prison inmates from false imprisonment to ensure people are not thrown into jail unlawfully. If petitioner seeks to attack a sentence to be served in the future under a federal judgment, petitioner should file a motion under 28 U.S.C. § 2255 in the. The proper Court to issue the Writ of Habeas Corpus is the Court wherein Petitioner is illegally confined. Or appellate counsel have traditionally fallen within the perview of the Writ of Habeas Corpus. Petitioner, a state prisoner proceeding pro se, has filed a petition for writ of habeas corpus pursuant to 28 U.S.C. § 2254.