Petition for Writ of Habeas Corpus
A petition asking a court to order the release of a person held in custody in violation of the Constitution or laws or treaties of the United States. A habeas petition is generally a civil case, separate from the criminal case; a federal prisoner's § 2255 motion is instead filed with the court that imposed the sentence.
- Governing rule
- 28 U.S.C. §§ 2241, 2243, 2244(d), 2254, 2255
- Type
- Filing
- Stage
- Before filing
- When it is used
- After a person is in custody; for state prisoners, generally after state remedies are exhausted and within the one-year limitation period.

When the petition for writ of habeas corpus is used
Timing: after a person is in custody; for state prisoners, generally after state remedies are exhausted and within the one-year limitation period. This step usually happens before a lawsuit is filed or right as it begins. At this point, the parties decide where and how the case will proceed.
What the rule requires
- The Supreme Court, any justice, the district courts and any circuit judge may grant writs of habeas corpus within their respective jurisdictions (28 U.S.C. § 2241(a)).
- For example, the writ extends to a prisoner in custody in violation of the Constitution or laws or treaties of the United States, among other listed situations (28 U.S.C. § 2241(c)(3)).
- Next, a court entertaining an application must forthwith award the writ or issue an order directing the respondent to show cause why the court should not grant it. The court need not do so if the application itself shows that the applicant or person detained is not entitled to it (28 U.S.C. § 2243).
More rules for the petition for writ of habeas corpus
- A person in custody under a state-court judgment applies under 28 U.S.C. § 2254. In general, that applicant must first exhaust the remedies available in the state courts (§ 2254(b)(1)(A)).
- In addition, a one-year limitation period applies to an application by a person in custody under a state-court judgment. However, the clock pauses while a properly filed state post-conviction application is pending (28 U.S.C. § 2244(d)(1)–(2)).
- Finally, a federal prisoner challenging a federal sentence generally moves the sentencing court under 28 U.S.C. § 2255, which has its own one-year limit (§ 2255(f)). A court will not entertain a § 2241 petition unless the § 2255 remedy is inadequate or ineffective to test the legality of the detention (§ 2255(e)).
In practice, read each requirement closely. Then check whether your court adds anything of its own. For example, many courts set page limits, formatting rules or a duty to confer with the other side first.
You can read the full text of 28 U.S.C. §§ 2241, 2243, 2244(d), 2254, 2255 online. Also, the federal judiciary publishes the current rules and recent amendments.
The petition for writ of habeas corpus in state court
This page covers the federal version. In state court, the petition for writ of habeas corpus may have a different name, a different deadline or a different form. For example, a state may count days differently or require a separate notice. So start with your state’s rules of civil procedure, then check the local rules. Our state procedures guide links to the official rules for every state and DC.
Key terms
In addition, these terms come up often with this procedure:
Related procedures
Similarly, these procedures often come up alongside it:
- Request for Order to Show Cause: a request asking the court to issue an order to show cause — an order directing a party or person to appear and explain why the court should not take a stated action, such as holding them in contempt for disobeying an order, granting an injunction or imposing sanctions.
- Notice of Appeal: the filing that starts an appeal from a federal district court to a court of appeals.
Before you rely on this page
Always read the current rule yourself instead of relying on a summary. Next, check the local rules and the judge’s standing orders, since they often add steps. Then look for recent decisions from your court that apply the rule. Finally, talk to a licensed attorney about your situation. You can find one in our directory.
State court procedure for this filing
The federal rule above applies in federal court. In state court, the same filing is governed by that state's own rules of civil procedure, statutes and local court rules. Many states model their rules on the Federal Rules of Civil Procedure, so the requirements are often similar, but names, numbers, deadlines and forms can differ. Always use the version that applies to the court where your case is filed.
Examples from the largest state court systems
| State | Where to look |
|---|---|
| Federal courts | 28 U.S.C. §§ 2241, 2243, 2244(d), 2254, 2255 |
| California | Cal. Penal Code § 1473 (writ of habeas corpus) |
| New York | N.Y. C.P.L.R. Article 70, § 7002 (habeas corpus) |
| Texas | Tex. Code Crim. Proc. art. 11.07 (felony post-conviction habeas, non-death cases) |
| Florida | Fla. R. Crim. P. 3.850 (motion to vacate, set aside, or correct sentence); Fla. R. App. P. 9.141 (review in postconviction cases) |
Each state citation was checked against the rule or code text (official source or a published copy) on October 24, 2026. Rules are amended often, so confirm the current version on the state's official site below.
Find the rule in your state
In your state's rules, look for the rule on petition for writ of habeas corpus. In states that number their rules like the federal rules, it is often the same rule number as the federal rule.
Official civil procedure rules for every state
- Alabama: Alabama Rules of Civil Procedure · Lawtopolis guide
- Alaska: Alaska Rules of Civil Procedure (Alaska Rules of Court) · Lawtopolis guide
- Arizona: Arizona Rules of Civil Procedure · Lawtopolis guide
- Arkansas: Arkansas Rules of Civil Procedure · Lawtopolis guide
- California: California Code of Civil Procedure (supplemented by California Rules of Court, Title Three – Civil Rules) · Lawtopolis guide
- Colorado: Colorado Rules of Civil Procedure · Lawtopolis guide
- Connecticut: Connecticut Practice Book (Superior Court procedure) · Lawtopolis guide
- Delaware: Superior Court Civil Rules (Rules of Civil Procedure, Superior Court of Delaware) · Lawtopolis guide
- Florida: Florida Rules of Civil Procedure · Lawtopolis guide
- Georgia: Georgia Civil Practice Act (O.C.G.A. Title 9, Chapter 11) · Lawtopolis guide
- Hawaii: Hawaiʻi Rules of Civil Procedure · Lawtopolis guide
- Idaho: Idaho Rules of Civil Procedure · Lawtopolis guide
- Illinois: Illinois Code of Civil Procedure (735 ILCS 5) and Illinois Supreme Court Rules, Article II (Rules on Civil Proceedings in the Trial Court) · Lawtopolis guide
- Indiana: Indiana Rules of Trial Procedure · Lawtopolis guide
- Iowa: Iowa Rules of Civil Procedure (Iowa Court Rules, Chapter 1) · Lawtopolis guide
- Kansas: Kansas Code of Civil Procedure, K.S.A. Chapter 60 (Procedure, Civil), Article 2 – Rules of Civil Procedure · Lawtopolis guide
- Kentucky: Kentucky Rules of Civil Procedure (CR) · Lawtopolis guide
- Louisiana: Louisiana Code of Civil Procedure · Lawtopolis guide
- Maine: Maine Rules of Civil Procedure · Lawtopolis guide
- Maryland: Maryland Rules, Title 2 (Civil Procedure – Circuit Court) · Lawtopolis guide
- Massachusetts: Massachusetts Rules of Civil Procedure · Lawtopolis guide
- Michigan: Michigan Court Rules of 1985, Chapter 2 (Civil Procedure) · Lawtopolis guide
- Minnesota: Minnesota Rules of Civil Procedure · Lawtopolis guide
- Mississippi: Mississippi Rules of Civil Procedure · Lawtopolis guide
- Missouri: Missouri Supreme Court Rules of Civil Procedure (Rule 41 et seq.) · Lawtopolis guide
- Montana: Montana Rules of Civil Procedure · Lawtopolis guide
- Nebraska: Neb. Rev. Stat. Chapter 25 (Courts; Civil Procedure) and Nebraska Court Rules of Pleading in Civil Cases (Neb. Ct. R. ch. 6, art. 11) · Lawtopolis guide
- Nevada: Nevada Rules of Civil Procedure · Lawtopolis guide
- New Hampshire: Rules of the Superior Court of the State of New Hampshire · Lawtopolis guide
- New Jersey: Rules Governing the Courts of the State of New Jersey, Part IV (civil practice rules, R. 4:1 et seq.) · Lawtopolis guide
- New Mexico: Rules of Civil Procedure for the District Courts (NMRA 1-001 et seq.) · Lawtopolis guide
- New York: New York Civil Practice Law and Rules (CPLR) · Lawtopolis guide
- North Carolina: North Carolina Rules of Civil Procedure (G.S. Chapter 1A) · Lawtopolis guide
- North Dakota: North Dakota Rules of Civil Procedure · Lawtopolis guide
- Ohio: Ohio Rules of Civil Procedure · Lawtopolis guide
- Oklahoma: Oklahoma Pleading Code (Title 12, Oklahoma Statutes) · Lawtopolis guide
- Oregon: Oregon Rules of Civil Procedure (ORCP) · Lawtopolis guide
- Pennsylvania: Pennsylvania Rules of Civil Procedure (Pa. Code Title 231) · Lawtopolis guide
- Rhode Island: Superior Court Rules of Civil Procedure · Lawtopolis guide
- South Carolina: South Carolina Rules of Civil Procedure (SCRCP) · Lawtopolis guide
- South Dakota: SDCL Chapter 15-6 (Rules of Procedure in Circuit Courts) · Lawtopolis guide
- Tennessee: Tennessee Rules of Civil Procedure · Lawtopolis guide
- Texas: Texas Rules of Civil Procedure · Lawtopolis guide
- Utah: Utah Rules of Civil Procedure · Lawtopolis guide
- Vermont: Vermont Rules of Civil Procedure · Lawtopolis guide
- Virginia: Rules of Supreme Court of Virginia, Part Three (Practice and Procedures in Civil Actions) · Lawtopolis guide
- Washington: Superior Court Civil Rules (CR) · Lawtopolis guide
- West Virginia: West Virginia Rules of Civil Procedure · Lawtopolis guide
- Wisconsin: Wisconsin Statutes Chapters 801–847 (Civil Procedure) · Lawtopolis guide
- Wyoming: Wyoming Rules of Civil Procedure · Lawtopolis guide
- District of Columbia: Superior Court Rules of Civil Procedure · Lawtopolis guide
Sources
- 28 U.S.C. §§ 2241, 2243, 2244(d), 2254, 2255
Official sources:
lawtopolis.com/usc/28/2241
uscourts.gov/rules-policies/current-rules-pra…
Sources last reviewed: 2026-10-24
Lawtopolis provides legal information and education, not legal advice. Using this site does not create an attorney-client relationship. Laws and court rules vary by jurisdiction and change over time; verify every authority against the official source and consult a licensed attorney in your jurisdiction about your situation.
