The Writ of Habeas Corpus protects prison inmates from false imprisonment to ensure people are not thrown into jail unlawfully. A petition for writ of habeas corpus is a legal action that allows individuals to challenge their unlawful imprisonment or restraint.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. The writ of Habeas Corpus is the legal system's last line of defense against unlawful incarceration. Federal habeas corpus is a procedure under which a federal court may review the legality of an individual's incarceration. Habeas corpus means demand of body. Due to the 5th, 6th, and 14th Amendments of the Constitution, most claims concern federal constitutional rights that were violated. That a Writ of Habeas Corpus issue out of this Court;. 2.