The first is that you must file your petition within one year of exhausting your direct appeal. Category Representing Yourself (Pro Se).To get a writ of habeas corpus, you must file a petition for a civil (not criminal) proceeding in either state or federal court. The federal district courts have very strict rules on where you may file an action. A Writ of Habeas Corpus is a civil proceeding that is available in both State and Federal Court to challenge the legality of imprisonment. Federal prisoners may file two different kinds of motions for post-conviction relief: "Section 2255 motions" and "Section 2241 habeas corpus petitions." The office may only represent persons who are indigent, that is, persons who lack independent resources sufficient to enable them to retain. Federal habeas corpus is a procedure under which a federal court may review the legality of an individual's incarceration. Rule 44.1. Application. Petition for habeas corpus must be filed in county of petitioner's conviction.