Habeas corpus refers to the principle of freedom from unlawful detention. The Writ of Habeas Corpus protects prison inmates from false imprisonment to ensure people are not thrown into jail unlawfully.A habeas corpus petition cannot act as a second direct appeal. A writ of habeas corpus is a petition that an individual uses to challenge their conviction or sentence in California. This section constitutes an overview on California habeas corpus practice as it relates to the handling of criminal appeals. A state court habeas petition is a way to ask the California state courts to review a criminal case issue that was not raised in a direct appeal. You do not have a right to be appointed a lawyer in a federal habeas corpus case (there is an exception for people with death sentences). Habeas corpus petitions are complicated and best left to experienced appellate counsel. All civil appeals from a lower court when filed in a higher court. (2) Administrative Review, Superintending Control, Extraordinary Writs.