Category Representing Yourself (Pro Se). First, a U.S.C. § 2254 allows us to file a petition for Habeas Corpus when the client is in custody under sentence of a state court and is in a state prison.To get a writ of habeas corpus, you must file a petition for a civil (not criminal) proceeding in either state or federal court. Any federal court may grant a writ of habeas corpus to a petitioner who is within its jurisdiction. The purpose of a petition for writ of habeas corpus is to challenge the legality of a person's confinement. If you are filing this petition in the superior court, you only need to file the original unless local rules require additional copies. It demands a person's release from unlawful detention. Where can I file a state writ of habeas corpus? You can file in a common pleas court, a court of appeals, or the Ohio Supreme Court. A habeas corpus petition attacking a criminal conviction or sentence shall be filed within two years from the date of final judgment in the trial court.