Category Representing Yourself (Pro Se). These rules govern a petition for a writ of habeas corpus filed.2 in a United States district court under 28 U.S.C. § 2254 by: 3. Federal habeas corpus is a procedure under which a federal court may review the legality of an individual's incarceration. Habeas corpus is a kind of petition that you can file in federal court to claim that your imprisonment violates federal law. Any federal court may grant a writ of habeas corpus to a petitioner who is within its jurisdiction. Though subject to different rules, incarcerated people in both state or federal custody may petition for a federal writ of habeas corpus. What Is Habeas Corpus? If you file your federal habeas petition without first seeking post-conviction relief in state court, you will lose the opportunity to raise any post-conviction. 2.3 FEDERAL AND OUT-OF-STATE DECISIONS.