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.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. This section constitutes an overview on California habeas corpus practice as it relates to the handling of criminal appeals. 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 legal proceeding designed to bring a party before a court to test whether they are being held lawfully. Latin for "that you have the body. Instead, it argues that there was a problem in the proceeding such as to merit a prisoner's release from custody, new trial, etc. In many countries, authorities may incarcerate someone for months or years without charging them.