A writ of habeas corpus works by forcing the government to appear before a judge and justify why it is holding someone in custody. In practice, that means filing a written petition in federal court, clearing a set of strict procedural gates, and convincing a judge that the detention violates the Constitution or federal law. Most petitions are denied, and understanding why turns on the details of how the process actually moves.
Federal courts get their authority to issue the writ from 28 U.S.C. § 2241, which reaches anyone held in violation of the Constitution, federal law, or U.S. treaties.1Office of the Law Revision Counsel. 28 U.S. Code Chapter 153 – Habeas Corpus2Office of the Law Revision Counsel. 28 USC 2254 – State Custody, Remedies in Federal Courts3Office of the Law Revision Counsel. 28 USC 2255 – Federal Custody, Remedies on Motion Attacking Sentence Filing under the wrong statute wastes time you may not have.
Grounds That Can Support a Petition
Habeas is not a second appeal. You cannot argue that the jury got it wrong or that the sentence was harsh. The petition must identify a specific constitutional or legal violation that made the detention unlawful, and courts start with a strong presumption that the original conviction was valid.
Ineffective assistance of counsel is the most common claim. The Sixth Amendment guarantees a competent lawyer, and courts apply a two-part test: the attorney’s performance fell below an objective standard of reasonableness, and that deficiency actually changed the outcome.4Cornell Law School. Sixth Amendment Both parts are harder to prove than most petitioners expect, because courts give wide latitude to trial strategy.
Due process claims cover prosecutors withholding favorable evidence, coerced confessions, or fundamentally flawed jury instructions. A conviction from a court that lacked jurisdiction is void from the start. Newly discovered evidence of actual innocence is a separate path, but the bar is set at evidence strong enough that no reasonable juror would have convicted; DNA testing and previously inaccessible records are the typical examples.
The One-Year Filing Deadline
Federal habeas petitions carry a one-year statute of limitations, and missing it is the single most common way petitioners lose the right to federal review. For state prisoners under § 2254, the clock generally starts when the conviction becomes final, meaning after direct appeals are exhausted or the time to file them expires.5Office of the Law Revision Counsel. 28 U.S. Code 2244 – Finality of Determination
The clock can start later in specific circumstances. If the government created an unconstitutional barrier to filing, the year runs from when that barrier was removed. If the Supreme Court recognizes a new constitutional right and makes it retroactive, the year runs from that decision. If the factual basis for the claim could not have been discovered earlier through reasonable diligence, the year starts when it could have been uncovered.5Office of the Law Revision Counsel. 28 U.S. Code 2244 – Finality of Determination
A state post-conviction petition pauses the federal clock while it is pending. Equitable tolling exists for extraordinary circumstances, but relying on it is a gamble. Treat the deadline as non-negotiable and work backward from it.
Exhausting State Remedies First
A federal court will generally not consider a habeas claim until you have raised it through the state court system, including direct appeals and any state post-conviction procedures, unless the state provides no meaningful process.2Office of the Law Revision Counsel. 28 USC 2254 – State Custody, Remedies in Federal Courts Filing in federal court before finishing this step draws a dismissal.
Procedural default is the related trap. If you failed to raise a claim properly in state court, and the state courts would now refuse to hear it because of a missed deadline or violated rule, the claim is generally barred from federal habeas review as well. Two narrow escape routes exist. You can show “cause and prejudice,” meaning some external obstacle prevented you from raising the claim and the error substantially harmed your defense. Or you can show that enforcing the default would produce a fundamental miscarriage of justice because you are actually innocent.
Preparing the Petition
The petition must be in writing and must identify the person being held, the custodian responsible for the detention (typically a prison warden), and the facility where the petitioner is confined.1Office of the Law Revision Counsel. 28 U.S. Code Chapter 153 – Habeas Corpus Federal courts provide standard forms through the clerk’s office or court website, and using them is effectively mandatory. The forms require a chronological history of all prior appeals and post-conviction motions; omissions here invite quick dismissal.
Beyond the form, the petition needs specific facts supporting each claim. Vague legal conclusions do not survive initial screening. Attach trial transcripts, sentencing orders, and prior court rulings. Witness declarations and expert reports help only if they are clearly organized and referenced inside the petition so the judge can locate the supporting evidence without hunting for it.
Most habeas petitioners file without a lawyer, and courts are somewhat more forgiving of pro se filings. That leniency has limits. A petition that never connects its factual allegations to specific constitutional violations gets denied regardless of who wrote it.
Filing, Fees, and Initial Screening
The completed petition goes to the clerk of the federal district court with jurisdiction over the place of detention. The filing fee is $5.6Office of the Law Revision Counsel. 28 USC 1914 – District Court, Filing and Miscellaneous Fees If even that is unaffordable, you can apply for in forma pauperis status by submitting an affidavit detailing your finances; prisoners must also include a certified copy of their trust fund account statement for the prior six months.7Office of the Law Revision Counsel. 28 USC 1915 – Proceedings in Forma Pauperis
Once filed, a judge screens the petition before the government even knows about it. The judge examines whether the claims are facially valid, whether the one-year deadline was met, whether state remedies were exhausted, and whether the petition raises issues that could entitle the petitioner to relief. Frivolous petitions and those with obvious procedural defects are dismissed at this stage. If the petition clears screening, the court orders the government to respond in writing.
There is no constitutional right to a lawyer in habeas proceedings, though the court has discretion to appoint one for petitioners who cannot afford counsel.2Office of the Law Revision Counsel. 28 USC 2254 – State Custody, Remedies in Federal Courts Appointment at the initial filing stage is uncommon. If the court orders an evidentiary hearing, appointing counsel for an indigent petitioner becomes mandatory.
How Federal Judges Review the Claim
This is where most petitions die. Under 28 U.S.C. § 2254(d), a federal court cannot grant habeas relief on any claim that the state court already decided on the merits unless that ruling either contradicted clearly established Supreme Court precedent or applied it in an objectively unreasonable way.2Office of the Law Revision Counsel. 28 USC 2254 – State Custody, Remedies in Federal Courts
“Unreasonable” does not mean “wrong.” A federal judge can believe the state court erred and still deny the petition if the error was not so far off the mark as to be unreasonable. State court factual findings are presumed correct, and the petitioner has to rebut them with clear and convincing evidence.2Office of the Law Revision Counsel. 28 USC 2254 – State Custody, Remedies in Federal Courts The federal court is not taking a fresh look. It is reviewing the state court’s work through a highly deferential lens.
Most petitions are decided on the papers. An evidentiary hearing happens only when the filings reveal genuine factual disputes the written record cannot resolve. At a hearing, both sides call witnesses and argue how constitutional standards apply. The petitioner carries the burden throughout.
Possible Outcomes
If the court grants the writ, several results are possible. Outright release is rare. More commonly, the court orders a new trial or directs the lower court to re-sentence the petitioner to correct legal errors. For federal prisoners under § 2255, the sentencing court can vacate, set aside, or correct the sentence.3Office of the Law Revision Counsel. 28 USC 2255 – Federal Custody, Remedies on Motion Attacking Sentence If the court denies the petition, the original sentence stands, and filing again is much harder.
Appealing a Denial
Losing at the district court does not automatically give you the right to appeal. State prisoners and federal prisoners under § 2255 must first obtain a certificate of appealability from either the district judge or a circuit judge. That certificate issues only on a substantial showing that a constitutional right was denied, and it must identify the specific issues that meet the standard.8Office of the Law Revision Counsel. 28 U.S. Code 2253 – Appeal A vague request will not work.
If the district judge denies the certificate, you can ask a circuit judge. Filing a notice of appeal without expressly requesting a certificate is treated as an implicit request to the court of appeals.9Cornell Law School. Federal Rules of Appellate Procedure, Rule 22 – Habeas Corpus and Section 2255 Proceedings The deadline for the notice of appeal is 60 days from the district court’s final order, longer than the 30-day window in most civil cases.10U.S. Department of Justice. Time to Appeal or Petition for Review or Certiorari Missing the 60 days forfeits the appeal entirely.
Why the First Petition Is Usually the Only One
Filing a second habeas petition is dramatically harder than filing the first. Under 28 U.S.C. § 2244(b), any claim you already raised in a prior petition is dismissed outright. Claims you could have raised but did not are also barred unless they fit one of two narrow exceptions: the claim relies on a new rule of constitutional law the Supreme Court has made retroactive, or it rests on facts you could not have discovered earlier through reasonable diligence, and those facts, viewed against the full record, would establish by clear and convincing evidence that no reasonable factfinder would have found you guilty.5Office of the Law Revision Counsel. 28 U.S. Code 2244 – Finality of Determination
Before filing a successive petition in the district court, you must get permission from the court of appeals. A three-judge panel decides within 30 days, and the decision cannot be appealed or challenged through a petition for rehearing.5Office of the Law Revision Counsel. 28 U.S. Code 2244 – Finality of Determination Treat the first petition as your only realistic shot and include every viable claim.