You will file a Habeas Corpus petition in California if you are arguing that your conviction violated a state law, or that a California law is unconstitutional. (a) Petition; form and court ruling.(1) Except as provided in (2), the petition must be on the Petition for Writ of Habeas Corpus (form HC-001). 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 is a legal proceeding designed to bring a party before a court to test whether they are being held lawfully. The Writ of Habeas Corpus protects prison inmates from false imprisonment to ensure people are not thrown into jail unlawfully. The writ of Habeas Corpus is the legal system's last line of defense against unlawful incarceration. Habeas petitions are typically the final step in a criminal case once the inmate has exhausted the appeals process and any other legal remedies. Latin for "that you have the body. The term "habeas corpus" is Latin and means "that you have the body.