How do you file a federal habeas corpus petition after a state conviction?
A person in custody under a state court judgment can ask a federal district court for a writ of habeas corpus under 28 U.S.C. § 2254. Habeas corpus is a court order that asks whether a person is held lawfully. First, the claims usually have to be finished in the state courts. Then the petition goes on the national form, AO 241, with every ground and its facts, signed under penalty of perjury. It is filed with the clerk of a federal district court, in the district the statute allows, within the one-year limit.
This page is general information about how the process works. It is not legal advice about your case.
A § 2254 habeas petition in short
- It is for a state court judgment. A federal sentence uses a § 2255 motion instead.
- The only question is whether you are “in custody in violation of the Constitution or laws or treaties of the United States” (§ 2254(a)).
- The claims must normally be finished (“exhausted”) in the state courts first.
- There is a one-year limit. Time while a properly filed state post-conviction case is pending does not count, and a federal petition does not pause it.
- To appeal a loss, you need a certificate of appealability, which is the court’s permission to appeal.

For what post-conviction relief is and how it differs from an appeal, see What is post-conviction relief?
How a habeas corpus petition is filed, step by step
- Exhaust state remedies. The state courts get the first chance to rule on each claim (§ 2254(b)(1)(A)).
- Check the one-year limit. The limit is in 28 U.S.C. § 2244(d), with a pause while a properly filed state post-conviction case is pending.
- Find the right federal court. A federal district court. In a state with two or more federal districts, § 2241(d) allows the district where you are held or the district where you were convicted.
- Complete form AO 241. Every ground, the facts for each, the relief asked for, signed under penalty of perjury (Rule 2).
- File it with the clerk. An original and two copies, with the filing fee or the papers Rule 3(a) lists instead.
Step 1: Are you in custody, and have you exhausted state remedies?
“In custody” is not only prison. In Jones v. Cunningham, 371 U.S. 236, 243 (1963), the Supreme Court held that parole counts, because it “imposes conditions which significantly confine and restrain his freedom.”
“Exhaust” means the state courts had a fair chance to fix the problem first. A petition “shall not be granted unless it appears that… the applicant has exhausted the remedies available in the courts of the State” (§ 2254(b)(1)(A)). There are narrow exceptions when no state process is available or it cannot protect your rights (§ 2254(b)(1)(B)). A claim is not exhausted “if he has the right under the law of the State to raise, by any available procedure, the question presented” (§ 2254(c)).
How far up the state courts a claim must go is set by case law. In O’Sullivan v. Boerckel, 526 U.S. 838, 845 (1999), the Supreme Court said state prisoners must give the state courts a chance “by invoking one complete round of the State’s established appellate review process.” The State gives up exhaustion only if “the State, through counsel, expressly waives the requirement” (§ 2254(b)(3)).
A claim the state courts refused to hear under their own procedural rules may also be blocked in federal court. Courts call this procedural default. In Coleman v. Thompson, 501 U.S. 722, 750 (1991), the Court said federal review of such claims “is barred unless the prisoner can demonstrate cause for the default and actual prejudice as a result of the alleged violation of federal law, or demonstrate that failure to consider the claims will result in a fundamental miscarriage of justice.”
Step 2: Is the habeas petition on time?
“A 1-year period of limitation” applies (28 U.S.C. § 2244(d)(1)). It usually runs from “the date on which the judgment became final by the conclusion of direct review or the expiration of the time for seeking such review” (§ 2244(d)(1)(A)). Three later start dates also exist, in § 2244(d)(1)(B) to (D).
Time does not count while “a properly filed application for State post-conviction or other collateral review” is pending (§ 2244(d)(2)). A federal petition does not pause the clock. The Supreme Court held in Duncan v. Walker, 533 U.S. 167, 181 (2001), that “§ 2244(d)(2) does not toll the limitation period during the pendency of a federal habeas petition.” In Holland v. Florida, 560 U.S. 631, 645 (2010), the Court also held “that § 2244(d) is subject to equitable tolling in appropriate cases.” The start dates, the pause and the exceptions are explained in the federal habeas corpus deadline guide.
Step 3: Which federal court takes a habeas petition?
You file with the clerk of a United States district court. In a state with two or more federal districts, § 2241(d) says the petition “may be filed in the district court for the district wherein such person is in custody or in the district court for the district within which the State court was held which convicted and sentenced him.”
The court where you file may, “in the exercise of its discretion and in furtherance of justice,” transfer it to the other district (§ 2241(d)). If you are held outside the state that convicted you, read your district’s instructions or ask the clerk which court takes the petition.
Step 4: How do you fill out and file form AO 241?
The AO 241 habeas form
The national form is AO 241, headed “Petition for Relief From a Conviction or Sentence By a Person in State Custody (Petition Under 28 U.S.C. § 2254 for a Writ of Habeas Corpus)” (Rev. 09/17).
Rule 2(d) of the Rules Governing Section 2254 Cases says the petition “must substantially follow either the form appended to these rules or a form prescribed by a local district-court rule.” It also says “the clerk must make forms available to petitioners without charge.”
What has to be in the habeas petition
Rule 2(c) says the petition must:
- “specify all the grounds for relief available to the petitioner;”
- “state the facts supporting each ground;”
- “state the relief requested;”
- “be printed, typewritten, or legibly handwritten; and”
- “be signed under penalty of perjury by the petitioner or by a person authorized to sign it for the petitioner under 28 U.S.C. § 2242.”
A ground is the legal reason your custody is unlawful. Facts are what happened, in plain detail. The AO 241 form warns that if grounds are left out, “you may be barred from presenting additional grounds at a later date.”
- Who to name. The respondent is the official on the other side. If you are in custody now, “the petition must name as respondent the state officer who has custody” (Rule 2(a)), usually the warden. If you are not yet in custody under the judgment but may be later, the petition “must name as respondents both the officer who has current custody and the attorney general of the state where the judgment was entered” (Rule 2(b)).
- One court per petition. Judgments of more than one state court need “a separate petition covering the judgment or judgments of each court” (Rule 2(e)).
Filing the habeas petition with the clerk
Rule 3(a) says “an original and two copies of the petition must be filed with the clerk” and lists what must come with them. Ask the clerk about the filing fee. Your district court may have its own instructions, so read its local rules.
If you are in prison, Rule 3(d) says a paper “is timely if deposited in the institution’s internal mailing system on or before the last day for filing.” If the prison has a legal mail system, “the inmate must use that system to receive the benefit of this rule.” The date can be shown by “a declaration in compliance with 28 U.S.C. § 1746 or by a notarized statement” giving the date of deposit and stating that first-class postage was prepaid.
What happens after you file a habeas petition?
Screening. Under Rule 4, a judge examines the petition. “If it plainly appears from the petition and any attached exhibits that the petitioner is not entitled to relief in the district court, the judge must dismiss the petition.” Otherwise the judge orders the respondent to file “an answer, motion, or other response within a fixed time, or to take other action the judge may order.”
The State’s answer. The State answers only if a judge orders it (Rule 5(a)). The answer “must state whether any claim in the petition is barred by a failure to exhaust state remedies, a procedural bar, non-retroactivity, or a statute of limitations” (Rule 5(b)). You may file a reply (Rule 5(e)).
A lawyer. The court “may appoint counsel for an applicant who is or becomes financially unable to afford counsel” (§ 2254(h)). If an evidentiary hearing is warranted, Rule 8(c) says “the judge must appoint an attorney to represent a petitioner who qualifies to have counsel appointed under 18 U.S.C. § 3006A.”
Can you appeal a habeas denial, or file again?
Appeal. Without a certificate of appealability, “an appeal may not be taken to the court of appeals” (§ 2253(c)(1)). It “may issue… only if the applicant has made a substantial showing of the denial of a constitutional right” (§ 2253(c)(2)). The district court “must issue or deny” one when it rules against you (Rule 11(a)), and “a motion to reconsider a denial does not extend the time to appeal.” If it is denied, the court of appeals may be asked under Appellate Rule 22. Under that rule, “if no express request for a certificate is filed, the notice of appeal constitutes a request.”
The notice of appeal is due “within 30 days after entry of the judgment or order appealed from” (FRAP 4(a)(1)(A)), subject to that rule’s exceptions. “A timely notice of appeal must be filed even if the district court issues a certificate of appealability” (Rule 11(b)). From prison, FRAP 4(c)(1) treats a notice as timely “if it is deposited in the institution’s internal mail system on or before the last day for filing,” with the declaration or proof that rule describes.
A second petition. First, “the applicant shall move in the appropriate court of appeals for an order authorizing the district court to consider the application” (§ 2244(b)(3)(A)). A claim already raised “shall be dismissed” (§ 2244(b)(1)). A new claim must rely on “a new rule of constitutional law, made retroactive to cases on collateral review by the Supreme Court, that was previously unavailable,” or on facts that “could not have been discovered previously through the exercise of due diligence” and meet § 2244(b)(2)(B)(ii). Even after permission, the district court “shall dismiss” a claim that does not meet these requirements (§ 2244(b)(4)).
Common mistakes when filing a habeas petition
- Filing before the state courts have had one complete round on every claim.
- Assuming a federal petition pauses the one-year clock.
- Naming the judge or prosecutor instead of the officer who has custody.
- Missing the notice of appeal deadline while waiting on the certificate.
Where does software fit in a habeas corpus petition?
Legal Ops Depot is AI litigation software and a law library. The software drafts a habeas petition at your direction, for the court on your caption and to that court’s official rules, with each ground you choose set out with the facts you give it. You decide what to raise. Every case citation is checked against the full court opinion on 4 points, and a citation that fails any point is removed. The one-year limit for a federal habeas petition (28 U.S.C. § 2244(d)) is not computed: it is flagged for you to check. You review the petition, sign it and file it yourself. The petitions page sets out what the Petition item covers.
Legal Ops Depot is not a law firm. It does not represent you, does not appear in court, and does not file anything for you. Nothing here is legal advice, and no one can promise a result.
More questions about filing a habeas corpus petition
Can I file a habeas petition if I am on parole?
In Jones v. Cunningham, 371 U.S. 236, 243 (1963), the Supreme Court held that parole “imposes conditions which significantly confine and restrain his freedom,” which is enough to be “custody” under the habeas statute.
Can I file in federal court while my state case is still pending?
A claim the state courts can still hear is not exhausted (§ 2254(c)). Time does not count while “a properly filed application for State post-conviction or other collateral review” is pending (§ 2244(d)(2)), and a federal petition is not one (Duncan v. Walker).
Will the court give me a lawyer for a habeas petition?
It may (§ 2254(h)). It must if it decides an evidentiary hearing is warranted and you qualify (Rule 8(c)).
Does the software compute the one-year habeas deadline?
No. The one-year limit for a federal habeas petition (28 U.S.C. § 2244(d)) is not computed: it is flagged for you to check. Filing on time stays your responsibility.
Is this page legal advice?
No. It is general information about how a § 2254 petition is filed, with its sources. For advice about your own case, ask a legal aid office or a lawyer.
Official resources for a federal habeas petition
Everything below is free and comes from the source.
Federal habeas statutes
- 28 U.S.C. § 2254Federal habeas for a person in state custody
- 28 U.S.C. § 2244The one-year limit and second petitions
- 28 U.S.C. § 2241Which district court, and transfer
- 28 U.S.C. § 2253Appeal and the certificate of appealability
Federal habeas form and rules
- AO 241 § 2254 petition formFree, from the federal courts
- Current federal rulesIncluding the Rules Governing § 2254 Cases and the appellate rules
Free help with a habeas petition
- Get Legal HelpLegal Services Corporation, the legal aid office finder
Cases, statutes and rules cited on this page
28 U.S.C. §§ 2241(d), 2244(b), 2244(d), 2253(c), 2254 · Rules Governing Section 2254 Cases 2, 3, 4, 5, 8 and 11 · Fed. R. App. P. 4 and 22
Jones v. Cunningham, 371 U.S. 236 (1963) · Coleman v. Thompson, 501 U.S. 722 (1991) · O’Sullivan v. Boerckel, 526 U.S. 838 (1999) · Duncan v. Walker, 533 U.S. 167 (2001) · Holland v. Florida, 560 U.S. 631 (2010)
Guides related to federal habeas corpus
What is the deadline to file a federal habeas corpus petition? · What is post-conviction relief? · How do I petition the U.S. Supreme Court? · Can’t afford a lawyer? Free legal help
This guide is general information, not legal advice. Legal Ops Depot is software and a law library, not a law firm. For advice about your own case, contact a legal aid office or a lawyer; see where free legal help comes from.
Not a law firm. Not legal advice. You remain the filer. Legal Ops Depot is AI litigation software. It builds court papers at your direction from the rules of your court and the case law it finds, including the law against you. It does not represent you and makes no promise or prediction about any result. You review, sign and file the papers yourself, and you are responsible for what you file.