The court must rule on a petition for writ of habeas corpus within 60 days after the petition is filed. A petition for writ of habeas corpus is a legal action that allows individuals to challenge their unlawful imprisonment or restraint.A Federal Writ of Habeas Corpus is the final avenue for review of issues that were denied in California state courts. Generally speaking, the writ of habeas corpus is available in any case where the trial court has acted in excess of its jurisdiction. 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. Habeas corpus is a legal instrument that allows you to contest your incarceration, conviction, or sentencing conditions. The Writ of Habeas Corpus protects prison inmates from false imprisonment to ensure people are not thrown into jail unlawfully. A writ of habeas corpus is a court order to a warden or jailer to bring a prisoner to court. Will the Public Defender represent me in a habeas corpus proceeding?