The court must rule on a petition for writ of habeas corpus within 60 days after the petition is filed. What is a Federal Writ of Habeas Corpus?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. The writ of Habeas Corpus is the legal system's last line of defense against unlawful incarceration. A writ of habeas corpus is a petition that an individual uses to challenge their conviction or sentence in California. A Writ of Habeas Corpus is used to appeal a court decision or to challenge conditions of probation or parole.