If you are filing this petition in the superior court, you only need to file the original unless local rules require additional copies. There is an official form (Judicial Council Form HC-001) for filing a state petition for writ of habeas corpus.A Writ of Habeas Corpus is used to appeal a court decision or to challenge conditions of probation or parole. It is called a 2254 petition because the statute governing federal habeas petitions challenging state court judgments is 28 USC section 2254. United States district court to challenge violations of the Constitution or laws or treaties of the. The habeas petition is for situations when a legal error occurred, as we say, outside the "four corners" of the court file. It ensures that individuals are not held in custody without proper legal justification. What is a writ of habeas corpus? Petitioner filed a petition for writ of habeas corpus in the California Supreme Court on May. They must have also filed a direct appeal to the appellate court and then to the California Supreme Court.