To file a habeas corpus petition in federal court, you complete the standardized petition form that matches your custody situation, file it in the correct federal district court within one year of your conviction becoming final, and pay a $5 filing fee or request permission to proceed without paying. The form, the statute, and the court all depend on who is holding you and why, so the first task is picking the right filing path.
Pick the Right Statute and Form
Three federal statutes govern habeas petitions, and using the wrong one can get your petition dismissed before a judge looks at the merits.
If you were convicted in state court and want to argue that your detention violates the U.S. Constitution or federal law, you file under 28 U.S.C. § 2254 in federal district court. Your state conviction must be final, meaning your direct appeals are complete or the time to appeal has run out.1Office of the Law Revision Counsel. 28 USC 2254 – State Custody; Remedies in Federal Courts Use Form AO 241.2United States Courts. Petition for Writ of Habeas Corpus Under 28 USC 2254
If you were convicted in federal court, you challenge the conviction or sentence under 28 U.S.C. § 2255 by filing a motion in the same federal court that sentenced you. This covers claims that the sentence exceeded the legal maximum, that the sentencing court lacked jurisdiction, or that a constitutional violation tainted the proceedings.3Office of the Law Revision Counsel. 28 USC 2255 – Federal Custody; Remedies on Motion Attacking Sentence
If you are in pretrial detention, immigration custody, or military confinement, or you are a federal prisoner challenging how your sentence is being carried out rather than the underlying conviction, you file under 28 U.S.C. § 2241.4Office of the Law Revision Counsel. 28 USC 2241 – Power to Grant Writ Disputes over good-time credit calculations are a common example. Use Form AO 242.5United States Courts. Petition for a Writ of Habeas Corpus Under 28 USC 2241
The threshold “in custody” requirement reaches beyond prison walls. People on parole or probation, in immigration detention, or involuntarily committed to psychiatric institutions can all file, because those conditions restrain liberty in a meaningful way.4Office of the Law Revision Counsel. 28 USC 2241 – Power to Grant Writ
Track the One-Year Deadline
Most habeas claims die on the calendar, not on the merits. Under the Antiterrorism and Effective Death Penalty Act of 1996 (AEDPA), state prisoners have one year to file a federal habeas petition. The clock generally starts when the state conviction becomes final, either because the highest available court denied review or because the time to seek further review expired.6Office of the Law Revision Counsel. 28 USC 2244 – Finality of Determination
The starting date can shift in three narrower situations: when the government created an unconstitutional barrier that prevented filing, when the Supreme Court recognizes a new constitutional right and makes it retroactive, or when the factual basis of the claim could not have been discovered earlier through reasonable effort.6Office of the Law Revision Counsel. 28 USC 2244 – Finality of Determination
How Tolling Works
A properly filed state post-conviction petition pauses the federal one-year clock while it works through the state courts. This is statutory tolling. If you wait eleven months before starting state post-conviction proceedings, the federal clock pauses with one month left and starts again when those state proceedings end. Waiting past the full year leaves nothing to pause.6Office of the Law Revision Counsel. 28 USC 2244 – Finality of Determination
Courts can also apply equitable tolling to excuse a missed deadline, but the standard is strict. You must show both that you diligently pursued your rights and that some extraordinary circumstance beyond your control prevented timely filing. A lawyer’s ordinary negligence does not qualify; egregious attorney misconduct combined with the petitioner’s own diligence might.7Justia. Holland v Florida, 560 US 631 (2010)
Fill Out the Petition Carefully
Whichever form you use, the petition must include:
- The custodian’s name. Usually the warden of the facility where you are held.
- The judgment being challenged. The exact title, date, and issuing court of the conviction or detention order.
- Prior appeal history. A complete account of every appeal and post-conviction motion filed in state or federal court, with the outcome of each.
- Specific factual grounds. A plain description of the facts supporting each constitutional claim. Petitions that state legal conclusions without factual support get dismissed.
Accurate detail matters more than legal polish. A clear description of what went wrong beats a document full of legal jargon and thin on specifics.
The filing fee for a federal habeas petition is $5, compared with $350 for most other civil actions in federal court.8Office of the Law Revision Counsel. 28 USC 1914 – District Court; Filing and Miscellaneous Fees If you cannot afford it, you can ask to proceed without paying by filing a financial disclosure showing inability to pay.5United States Courts. Petition for a Writ of Habeas Corpus Under 28 USC 2241
Constitutional Grounds That Belong in the Petition
A habeas petition must claim that your detention violates the Constitution or federal law. Vague complaints about unfairness are not enough. The claims that show up most often:
- Ineffective assistance of counsel. A Sixth Amendment claim with a two-part test: your lawyer’s performance was objectively deficient, and there is a reasonable probability the outcome would have been different with competent representation.9Congress.gov. Amdt6.6.5.1 Overview of the Right to Effective Assistance of Counsel
- Prosecution withholding favorable evidence. Under the Brady rule, prosecutors must turn over evidence favorable to the defense. When they do not, and the hidden evidence could have changed the verdict, the conviction is constitutionally suspect. These violations often surface years later.
- Coerced confessions or illegally obtained evidence. A confession extracted through coercion, or evidence seized in violation of the Fourth Amendment, can make the resulting detention unlawful when that evidence drove the conviction.
- Due process violations. The Fifth and Fourteenth Amendments guarantee fair proceedings. Claims include prosecutors presenting false testimony or a trial court failing to order a competency hearing when the defendant showed clear signs of being unable to understand the proceedings.
Finding a constitutional error is not enough by itself. The error must also have been harmful. Federal courts apply a “substantial and injurious effect” test: if the mistake did not actually influence the jury’s verdict, the court will not grant relief.
The State Prisoner Barriers: Exhaustion and AEDPA Review
If you were convicted in state court, two additional obstacles stand between you and a federal ruling on the merits.
First, you must exhaust state remedies. Before a federal court will hear the petition, you have to present the same constitutional arguments to every available level of the state court system. Two narrow exceptions apply: the state has no corrective process, or that process is ineffective under the circumstances.1Office of the Law Revision Counsel. 28 USC 2254 – State Custody; Remedies in Federal Courts Because shuttling between state and federal court eats the one-year clock, starting state post-conviction proceedings quickly after the conviction becomes final is critical.
Second, AEDPA sets a deferential standard of review. A federal court cannot grant relief just because it would have ruled differently. It can act only if the state court’s decision was “contrary to” clearly established Supreme Court precedent, applied that precedent in an objectively unreasonable way, or rested on an unreasonable determination of the facts.1Office of the Law Revision Counsel. 28 USC 2254 – State Custody; Remedies in Federal Courts The state court doesn’t just have to be wrong; it has to be so wrong that no fair-minded judge could have reached the same conclusion. This standard is the single biggest reason federal habeas petitions fail.
What Happens After You File
Once the petition arrives, a judge conducts a preliminary screening. A petition that is clearly frivolous or procedurally defective can be dismissed at that stage without further proceedings. If the petition survives, the judge orders the government to respond.
The statute technically gives the government three days to respond, extendable up to twenty days for good cause.10Office of the Law Revision Counsel. 28 USC 2243 – Issuance of Writ; Return; Hearing; Decision In practice, the rules governing § 2254 cases give judges discretion to set a longer deadline, and most courts allow considerably more time.11United States Courts. Rules Governing Section 2254 and Section 2255 Proceedings The government’s response usually includes trial records and transcripts arguing that the detention is lawful. The petitioner typically gets a chance to reply.
If factual disputes remain, the court may hold an evidentiary hearing. When the court grants relief, the remedy depends on what went wrong. A flawed trial may result in an order releasing the petitioner unless the state retries them within a set period. A sentence that exceeded the legal maximum can be corrected. A conviction obtained through suppressed evidence can be vacated. From filing to final decision, the process often stretches over months or years.
If You Missed the Deadline: Actual Innocence
For petitioners who missed the one-year deadline or failed to raise a claim properly in state court, one narrow escape remains: a credible showing of actual innocence. The Supreme Court has held that actual innocence can serve as a gateway past both the statute of limitations and procedural default rules.12Justia. McQuiggin v Perkins, 569 US 383 (2013)
The standard is demanding. You must show that “it is more likely than not that no reasonable juror would have convicted” in light of new evidence. Unexplained delay in bringing the claim counts against you as a factor the court weighs when assessing credibility, though not as an absolute bar.12Justia. McQuiggin v Perkins, 569 US 383 (2013)
If Your Petition Is Denied
Losing in district court does not automatically entitle you to appeal. Petitioners under § 2254 and § 2255 need a certificate of appealability, and a judge issues one only if the petitioner makes a “substantial showing of the denial of a constitutional right.” The certificate must identify the specific issues that cleared that bar.13Office of the Law Revision Counsel. 28 USC 2253 – Appeal If the district judge denies the certificate, you can ask a circuit judge to issue one instead.
Filing a second habeas petition after a first was denied is extremely difficult. Any claim already raised in the first petition is dismissed automatically. New claims are dismissed unless they rely on a new rule of constitutional law that the Supreme Court made retroactive, or the factual basis could not have been discovered earlier through reasonable diligence and the new facts establish by clear and convincing evidence that no reasonable jury would have found you guilty.6Office of the Law Revision Counsel. 28 USC 2244 – Finality of Determination
You cannot even file a successive petition in district court without permission from the court of appeals. A three-judge panel reviews whether the petition makes a preliminary showing that meets those strict requirements. The panel decides within 30 days, and its decision cannot be appealed or challenged through any further petition.6Office of the Law Revision Counsel. 28 USC 2244 – Finality of Determination
Getting Help
There is no constitutional right to a lawyer in habeas proceedings the way there is at trial. Most petitioners represent themselves, and the forms and procedures are designed with that in mind. Federal courts do have authority to appoint counsel for indigent habeas petitioners when the interests of justice require it, particularly if the court orders an evidentiary hearing or the case involves unusually complex legal issues.
The practical result is that many petitions are drafted by people without legal training, working from prison law libraries with limited resources. Procedural errors in those petitions can cause dismissal before a judge ever considers whether a constitutional violation occurred. If you have access to a legal aid organization or a law school clinic that handles post-conviction work, seeking help early beats trying to fix a deficient petition after filing.