A petition for writ of habeas corpus is a legal action that allows individuals to challenge their unlawful imprisonment or restraint. This section constitutes an overview on California habeas corpus practice as it relates to the handling of criminal appeals.Any order denying a petition for writ of habeas corpus must contain a brief statement of the reasons for the denial. 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. The purpose of the writ is to challenge a conviction often for reasons that might not be evident in the court record. If you want information about federal habeas corpus, send a request to Prison Law Office, General Delivery, San. In many countries, authorities may incarcerate someone for months or years without charging them. "verified" (meaning that the statements in the petition are sworn to be true).