The Writ of Habeas Corpus protects prison inmates from false imprisonment to ensure people are not thrown into jail unlawfully. This manual explains how someone without a lawyer can file a petition for writ of habeas corpus in the California state courts.A writ of habeas corpus is used to request that the Court of Appeal review the grounds for the order. This petition, called a writ of Habeas Corpus, is filed in Federal Court (US District Court ) whether you are serving time in a federal or state prison. Forms and samples for commonly filed documents in the Court of Appeal and superior courts. A federal petition for habeas corpus is filed after a conviction and sentence in state court, and after appeals in state court. Any prisoner, or another person acting on their behalf, may petition the court, or a judge, for a writ of habeas corpus. They must have also filed a direct appeal to the appellate court and then to the California Supreme Court. Professor of Pediatrics at U.C. San Diego School of Medicine. A writ of habeas corpus is another means to fighting the legality of one's incarceration or proving actual innocence.