Federal Habeas Corpus: 2241, 2254, and 2255 Explained

Habeas corpus — the “great writ” — is the historic remedy for unlawful imprisonment. In the modern federal system, however, “habeas corpus” is not one thing. It is a set of related but distinct statutes, and using the wrong one can mean a case is dismissed before a court ever reaches the merits. Knowing which habeas vehicle fits a given situation is a threshold question with real consequences.

At Elizabeth Franklin-Best, P.C., habeas and post-conviction litigation is a recognized strength rather than a sideline. Our principal attorney, Elizabeth Franklin-Best, was named among the Best Lawyers in America for 2026 as a “Best Lawyer” in Appellate Practice, carries a Chambers USA 2026 ranking in Litigation: White-Collar Crime & Government Investigations, and wrote Reversing Your Criminal Conviction. She is admitted to the United States Supreme Court and all twelve federal circuits and has served as counsel of record in published habeas decisions, including the federal collateral-review cases King v. Riley, 76 F.4th 259 (4th Cir. 2023), Vandross v. Stirling, 986 F.3d 442 (4th Cir. 2021), and Bryant v. Stephan, 998 F.3d 128 (4th Cir. 2021), and the capital habeas matters Wood v. Stirling, 27 F.4th 269 (4th Cir. 2022), and Bennett v. Stirling, 170 F. Supp. 3d 851 (D.S.C. 2016). Managing Director Christopher Zoukis, an authority on the federal prison system, adds working knowledge of how the Bureau of Prisons actually executes sentences. Federal habeas corpus is governed by statutes including 28 U.S.C. § 2241, § 2254, and § 2255.

This guide explains federal habeas corpus — what the writ is, how 28 U.S.C. § 2241, § 2254, and § 2255 differ, when each applies, the narrow “saving clause,” and why choosing the correct vehicle matters so much. If you are considering a habeas petition, this guide explains the landscape, and a federal habeas corpus lawyer can determine the right path.

An Antique Scale And Law Book On An Attorney'S Desk Representing Federal Habeas Corpus

Quick Answer

QuestionAnswer
What is habeas corpus?The legal mechanism by which a person in custody can ask a court to determine whether the detention is lawful — the historic “great writ.”
Which statute applies to a federal prisoner challenging a conviction?28 U.S.C. § 2255 — the motion to vacate, set aside, or correct the sentence, filed in the sentencing court.
When is § 2241 used by a federal prisoner?Principally to challenge the execution of a sentence — how the Bureau of Prisons is carrying it out — filed where the prisoner is confined.
What is the saving clause?A narrow provision allowing resort to § 2241 where the § 2255 remedy is inadequate or ineffective. It is narrow and has been further limited by recent precedent.
What is § 2254 for?It is the vehicle for a state prisoner challenging a state-court conviction or sentence in federal court.
How do we begin?With a paid, one-hour initial consultation that pins down the correct vehicle, court, and deadline for your specific claim.

Key Takeaways

  • Habeas corpus is the historic remedy for unlawful detention, implemented in the federal system through several statutes.
  • Section 2255 is the vehicle for a federal prisoner challenging the legality of a conviction or sentence.
  • Section 2241 is principally used by a federal prisoner to challenge the execution of a sentence, such as sentence computation.
  • A federal prisoner generally cannot bypass § 2255 by labeling a conviction challenge as a § 2241 petition.
  • The saving clause permits § 2241 only where § 2255 is inadequate or ineffective — a route Jones v. Hendrix (2023) all but closed for statutory-interpretation claims.
  • Disputes over First Step Act time credits and good-conduct time are execution claims that belong in § 2241.
  • Under Rumsfeld v. Padilla, a § 2241 petition names the warden and is filed in the district of confinement.
  • Section 2254 is the vehicle for a state prisoner challenging a state conviction in federal court.
  • Choosing the correct vehicle is decisive — the wrong one can lead to dismissal before the merits.
  • Correctly characterizing the claim and matching it to the proper statute, court, and deadline is the essential first step.

What Is Habeas Corpus?

Habeas corpus is the legal mechanism by which a person held in custody can ask a court to determine whether the detention is lawful. Often called the “great writ,” it is one of the oldest protections of individual liberty in the Anglo-American legal tradition, and it is enshrined in the United States Constitution.

In its essence, a writ of habeas corpus directs the official holding a person to justify the detention before a court. If the detention cannot be justified under law, the writ provides for release. The principle is simple: no one should be imprisoned without lawful authority, and a court must be available to test that authority.

In modern federal practice, however, the simple principle is implemented through several specific statutes. A person seeking habeas relief must use the correct statutory vehicle for their situation. The rest of this guide explains those vehicles and how they fit together.

The Three Habeas Statutes

Three statutes do most of the work in modern federal habeas practice. They serve different situations, and the differences are fundamental.

  • 28 U.S.C. § 2255. The vehicle for a federal prisoner challenging the legality of the conviction or sentence itself. Although it is technically a motion rather than a habeas petition, it functions as the federal prisoner’s primary post-conviction remedy.
  • 28 U.S.C. § 2241. The general habeas statute. For a federal prisoner, it is principally used to challenge the manner in which a sentence is being executed — not the conviction itself.
  • 28 U.S.C. § 2254. The vehicle for a person in state custody challenging a state-court conviction or sentence in federal court.

The first question in any habeas matter is therefore: who is the prisoner, and what are they challenging? A federal prisoner challenging a federal conviction is in § 2255 territory. A federal prisoner challenging how the sentence is being carried out is generally in § 2241 territory. A state prisoner challenging a state conviction is in § 2254 territory. Getting this threshold question right is the foundation of everything that follows.

Section 2255 for Federal Prisoners

For a federal prisoner who wants to challenge the conviction or the sentence as imposed, the correct vehicle is ordinarily a motion under 28 U.S.C. § 2255 — not a general habeas petition.

Section 2255 was enacted to channel federal prisoners’ collateral challenges into a single, defined remedy, filed in the sentencing court. It is the avenue for claims that the conviction or sentence violated the Constitution or laws of the United States, that the court lacked jurisdiction, or that the sentence exceeded the legal maximum. Our detailed guide to Section 2255 motions covers its grounds, its one-year deadline, and its procedure.

The key point for this guide is that § 2255 is the default. A federal prisoner generally cannot bypass § 2255 — with its one-year deadline and its strict limits on second or successive motions — by simply labeling a challenge to the conviction as a § 2241 habeas petition. The law does not permit that workaround except in a very narrow circumstance, discussed below.

Section 2241 and the Execution of a Sentence

For a federal prisoner, the principal proper use of § 2241 is to challenge the execution of a sentence — that is, how the Bureau of Prisons is carrying it out — rather than the conviction or the sentence as imposed.

Execution-of-sentence issues that may be raised through a § 2241 petition can include disputes over the computation of a sentence and the release date, the calculation or application of credits, certain disciplinary matters, and similar questions about how the sentence is being administered. Importantly, a § 2241 petition of this kind is generally filed in the federal district where the prisoner is confined, not in the sentencing court — another reason the vehicle matters.

So the dividing line, for a federal prisoner, is this: a challenge to the legality of the conviction or sentence goes through § 2255; a challenge to the way the sentence is being executed generally goes through § 2241. Identifying which kind of claim a prisoner actually has is essential to filing in the right court, in the right form.

Applied Insight: A surprising number of habeas petitions fail not on the merits but on the vehicle. A challenge to a conviction filed as a § 2241 petition, or a sentence-computation dispute filed as a § 2255 motion, can be dismissed before any court considers whether the claim is good. The first job in any habeas matter is to characterize the claim correctly and choose the right statute.

FSA Credits, Good-Conduct Time, and Other BOP Disputes

The most active corner of § 2241 practice today involves credits against federal sentences. Under the First Step Act, eligible prisoners earn time credits under 18 U.S.C. § 3632(d)(4) for completing recidivism-reduction programming, and the Bureau of Prisons must apply those credits toward earlier transfer to prerelease custody or supervised release. Separately, § 3624(b) entitles prisoners to good-conduct time of up to 54 days for each year of the sentence imposed. When the BOP gets the math wrong — an incorrect earning rate, an erroneous eligibility exclusion, credits earned but never applied — the dispute concerns the execution of the sentence, and § 2241 is the vehicle. Our guide to First Step Act relief covers the credit rules in detail.

Two practical rules govern these petitions. First, courts ordinarily expect the prisoner to exhaust the BOP’s Administrative Remedy Program before filing — the BP-9, BP-10, and BP-11 sequence — though exhaustion can be excused in limited circumstances, such as where pursuing it would be futile or the release date would pass first. Second, the petition must go to the right court against the right official, the subject of the next section. Placement disputes — halfway-house and home-confinement decisions — and legacy parole-era issues for old-law prisoners travel the same § 2241 road.

Where to File and Whom to Name

The Supreme Court answered both questions in Rumsfeld v. Padilla, 542 U.S. 426 (2004). For a “core” habeas challenge to present physical custody, the proper respondent is the prisoner’s immediate custodian — the warden of the facility — not the Attorney General or the Director of the Bureau of Prisons. And the petition belongs in the federal district where the prisoner is confined, because that is the court with jurisdiction over the custodian.

The rule sounds technical, and it is — but it decides cases. A § 2241 petition naming the wrong respondent, or filed in the sentencing district instead of the district of confinement, invites dismissal or transfer, and a transfer can consume months that a prisoner approaching a release date does not have. If the government moves the prisoner after a properly filed petition, the original court generally keeps the case. We confirm the custody location on the day we file.

The Saving Clause

There is one narrow circumstance in which a federal prisoner may be able to challenge a conviction through § 2241 rather than § 2255 — the so-called “saving clause.”

Section 2255 contains a provision, sometimes called the saving clause or the savings clause, that allows resort to traditional habeas under § 2241 where the remedy under § 2255 is “inadequate or ineffective” to test the legality of the detention. Historically, prisoners invoked this provision in limited situations to raise claims they could not bring through § 2255.

The saving clause has always been narrow, and the Supreme Court all but closed it in Jones v. Hendrix, 599 U.S. 465 (2023). Before Jones, most circuits allowed a prisoner who could not satisfy § 2255(h)’s second-or-successive gates to raise a new statutory-interpretation claim — an argument that the conduct of conviction was never a crime under the statute as later construed — through a § 2241 petition. Jones rejected that reading: the inability to meet § 2255(h)’s requirements does not make the § 2255 remedy “inadequate or ineffective,” so those claims no longer pass through the saving clause.

The Supreme Court refined the surrounding gatekeeping rules in Bowe v. United States, 607 U.S. 13 (2026). Bowe held that the “old-claim” bar in § 2244(b)(1) governs only state prisoners under § 2254 and does not reach a federal prisoner’s § 2255 motion, and that the certiorari bar in § 2244(b)(3)(E) likewise does not apply to federal prisoners. The decision does not reopen the saving clause — it leaves Jones intact and reaffirms that § 2255(h) supplies the only two grounds for a successive motion — but it confirms that the § 2255 track, not § 2241, is where a federal prisoner’s repeat collateral claims live or die.

What survives is a sliver. The clause still reaches unusual situations in which it is genuinely impossible or impracticable to seek relief in the sentencing court — the historic example being a sentencing court that has been dissolved. Whether a particular case fits through what remains is a question for counsel current on post-Jones decisions. It should never be assumed.

Section 2254 for State Prisoners

For completeness, it is worth identifying the third statute. A person in state custody who wishes to challenge a state-court conviction or sentence in federal court generally proceeds under 28 U.S.C. § 2254.

A § 2254 petition is a distinct proceeding with its own demanding rules — including a requirement that the petitioner first exhaust available state-court remedies, a one-year limitations period, and a highly deferential standard of review of state-court decisions. Section 2254 is the vehicle for state prisoners; it is not the vehicle for a federal prisoner challenging a federal conviction.

This firm’s federal criminal defense practice focuses on the federal system — federal investigations, charges, trials, sentences, appeals, and the federal post-conviction remedies of § 2255 and § 2241. Section 2254 is mentioned here only to complete the picture of how the habeas statutes are divided.

Why Choosing the Right Vehicle Matters

The recurring theme of federal habeas practice is that the choice of vehicle is itself decisive. It is not a formality — it determines where the case is filed, which deadlines and rules apply, and whether the court will reach the merits at all.

A petition filed under the wrong statute can be dismissed for that reason alone. A claim that belongs in § 2255 but is filed under § 2241 may be rejected; a sentence-execution claim filed as a § 2255 motion may be dismissed as not cognizable there. And because § 2255 has a one-year deadline and strict successive-motion rules, a misstep on the vehicle can also mean a missed deadline or a lost opportunity that cannot be recovered.

Getting the vehicle right is therefore the first and most important step. It requires correctly characterizing the claim — is this a challenge to the conviction, to the sentence as imposed, or to the execution of the sentence? — and matching it to the proper statute, the proper court, and the proper deadline. That analysis is exactly what experienced post-conviction counsel provides.

How Our Firm Handles Habeas Matters

Our habeas practice starts where these cases are actually won or lost: the threshold questions. Elizabeth Franklin-Best has litigated post-conviction matters in courts across the country, including dozens of state and federal habeas petitions and a series of capital habeas cases, and is admitted before the U.S. Supreme Court and all twelve federal circuit courts of appeals. Christopher Zoukis’s familiarity with BOP sentence computation, programming credits, and placement decisions gives the firm an unusual edge on execution-of-sentence claims.

Our habeas work includes correctly characterizing the claim, identifying the proper statutory vehicle, the proper court, and the controlling deadline, litigating § 2255 motions for federal prisoners challenging a conviction or sentence, handling § 2241 petitions on execution-of-sentence issues, and evaluating — under current law — whether the narrow saving clause is genuinely available. We represent federal defendants nationwide.

For related reading, see our federal post-conviction relief overview and our guides to Section 2255 motions and ineffective assistance of counsel.

Talk With a Federal Habeas Corpus Lawyer

Federal habeas corpus is not one remedy but several, and using the wrong one can end a case before a court reaches the merits. Determining the correct vehicle — § 2255, § 2241, or § 2254 — is the essential first step, and it requires experienced analysis.

A habeas case that starts in the wrong lane rarely recovers. In a paid, one-hour initial consultation, we sort the claim into its proper vehicle — § 2255, § 2241, or neither — pin down the controlling court and deadline, and tell you plainly whether the petition is worth filing. Schedule yours before the procedural clock makes the decision for you.

What is habeas corpus?

Habeas corpus is the legal mechanism by which a person held in custody can ask a court to determine whether the detention is lawful. Often called the great writ, it is one of the oldest protections of individual liberty and is enshrined in the U.S. Constitution.

What are the main federal habeas statutes?

Three statutes do most of the work: 28 U.S.C. § 2255, for a federal prisoner challenging a conviction or sentence; § 2241, the general habeas statute, used by a federal prisoner principally to challenge the execution of a sentence; and § 2254, for a state prisoner challenging a state conviction.

Which statute does a federal prisoner use to challenge a conviction?

A federal prisoner challenging the legality of the conviction or the sentence as imposed ordinarily proceeds under 28 U.S.C. § 2255 — a motion filed in the sentencing court — not a general habeas petition.

When does a federal prisoner use Section 2241?

For a federal prisoner, § 2241 is principally used to challenge the execution of a sentence — how the Bureau of Prisons is carrying it out, such as sentence computation, the release date, or credits — rather than the conviction itself.

Where is a Section 2241 petition filed?

A § 2241 petition challenging the execution of a sentence is generally filed in the federal district where the prisoner is confined, not in the court that imposed the sentence. This is one reason choosing the correct vehicle matters.

Can a federal prisoner use § 2241 to challenge a conviction?

Generally no. A federal prisoner cannot bypass § 2255 by labeling a challenge to the conviction as a § 2241 petition. The only exception is the narrow saving clause, which applies where the § 2255 remedy is inadequate or ineffective.

What is the saving clause?

The saving clause is a provision of § 2255 that allows resort to traditional habeas under § 2241 where the § 2255 remedy is inadequate or ineffective to test the legality of the detention. It has always been narrow and has been further limited by recent Supreme Court precedent.

Has the saving clause been narrowed?

Yes. Recent Supreme Court precedent has significantly narrowed the saving clause — for example, holding that the inability to file a second or successive § 2255 motion does not, by itself, make the § 2255 remedy inadequate or ineffective. Its availability must be evaluated under current law.

What is Section 2254 for?

Section 2254 is the vehicle for a person in state custody who wishes to challenge a state-court conviction or sentence in federal court. It has its own demanding rules, including exhaustion of state remedies and a deferential standard of review.

Why does choosing the right habeas vehicle matter?

The choice of vehicle determines where the case is filed, which deadlines and rules apply, and whether the court reaches the merits. A petition filed under the wrong statute can be dismissed for that reason alone, before any court considers the claim.

Is a 2255 motion the same as a habeas petition?

Functionally, a § 2255 motion serves as a federal prisoner’s primary habeas-type remedy, though it is technically a motion filed in the sentencing court rather than a traditional habeas petition. It was designed to channel federal prisoners’ collateral challenges into a single defined remedy.

Do I need a lawyer for a habeas matter?

Yes. Federal habeas practice is technical, and the threshold choice of vehicle is decisive. Experienced counsel can correctly characterize the claim, identify the proper statute, court, and deadline, and avoid a dismissal that never reaches the merits.

Can I go to court if the BOP refuses to apply my First Step Act credits?

Yes. A dispute over earned time credits under 18 U.S.C. § 3632(d)(4) or good-conduct time under § 3624(b) concerns the execution of the sentence, so it proceeds as a § 2241 petition in the district of confinement — generally after exhausting the BOP’s Administrative Remedy Program.

Who is the proper respondent in a 2241 petition?

Under Rumsfeld v. Padilla, a petition challenging present physical custody names the warden of the facility where the prisoner is held — not the Attorney General or the BOP Director — and is filed in the federal district of confinement.

Did Jones v. Hendrix eliminate the saving clause?

Not entirely, but it closed the main route. The Supreme Court held that the inability to file a second or successive 2255 motion does not make the 2255 remedy inadequate or ineffective, so statutory-interpretation claims no longer reach § 2241 that way. Only rare situations, such as a dissolved sentencing court, remain.

What is the difference between Section 2254 and Section 2255?

Section 2254 is for a person in state custody challenging a state-court conviction in federal court. Section 2255 is for a federal prisoner challenging a federal conviction or sentence, filed as a motion in the sentencing court. They are separate vehicles with separate rules, and a federal prisoner uses 2255, not 2254.

Does Bowe v. United States affect federal habeas filings?

Yes, for second or successive Section 2255 motions. In Bowe v. United States (2026), the Supreme Court held that the old-claim bar in section 2244(b)(1) applies only to state prisoners and that the certiorari bar in section 2244(b)(3)(E) does not reach federal prisoners. It did not expand Section 2241 or the saving clause; the two grounds in section 2255(h) still control.

Scroll to Top