Quick answer
A writ of habeas corpus is a petition that asks a court to review whether a person's custody is lawful, and it is not a new appeal of the verdict. It is used when direct appeal and state post-conviction options have ended or do not reach the problem, such as a constitutional violation that depends on facts outside the trial record. State and federal petitions follow different rules, filing courts and strict deadlines. Check the applicable statute or consult a licensed attorney before deciding anything for a specific case.
This page is general information, not legal advice. Legal Experts AI is a marketplace where attorneys and litigation teams find and retain expert witnesses. It is not a law firm.
What a writ of habeas corpus asks a court to decide
A writ of habeas corpus asks a court to decide whether a person's custody is lawful. The name comes from Latin and roughly means "you shall have the body," which reflects the writ's purpose of bringing the detained person before a court. The petition challenges the custody itself, not only errors made during the trial. For the Latin term, see corpus meaning in law.
For a person held under a state court judgment, federal law is narrower. A federal court may act only on the ground that custody violates "the Constitution or laws or treaties of the United States" under 28 U.S.C. § 2254(a). On its face, that limits federal review to federal grounds.
Custody can include prison and jail. Whether probation, parole or immigration detention counts depends on the statute and the court, so that question needs legal review. What relief a court can order depends on the ground raised and the court. The remedy available in a given case is a question for counsel.
How habeas corpus differs from appeals and other post-conviction motions
Habeas differs from a direct appeal because it is a separate proceeding that asks whether custody is lawful. Whether it can reach facts outside the trial record depends on the claim and the procedural rules that apply. A direct appeal reviews what is in the trial record and the filed documents, and it runs from the judgment or sentence under firm deadlines. An issue that is not raised in time may be lost.
Motions for new trial and motions to modify a sentence stay within the criminal case. A habeas petition is a separate proceeding that asks whether custody is lawful. Clemency is different again: it is requested from the executive branch, not from a court.
When habeas corpus may be used after appeal options end
Habeas is considered when appeal options have ended or cannot reach the problem, and the claim depends on facts that were not in the trial record. Three situations come up often.
First, the appeal deadline has passed, or the highest relevant court has ruled on the appeal. Second, a key fact was found later, such as a witness's sworn statement or evidence the prosecution withheld. Third, a claim involves errors by trial or appellate counsel that could not be seen on appeal. Counsel errors during the collateral proceedings themselves are different. Under 28 U.S.C. § 2254(i), the ineffectiveness or incompetence of counsel in those proceedings is not a ground for relief in a federal petition.
Each of these situations is a question to evaluate for the case, not a guaranteed ground for relief.
State habeas corpus petitions: filing court, exhaustion and rules
State petitions are filed in the courts that state law designates, and the court and the rules differ from state to state. Deadlines, forms, notarization and service requirements also vary. Check the state's habeas statute and court rules before filing.
State proceedings matter for later federal review, too. A federal court generally requires that state remedies be used first, as described in the next section. Each state's own steps and deadlines have to be confirmed from its official sources.
Federal habeas corpus petitions for state prisoners
State prisoners commonly file federal petitions under 28 U.S.C. § 2254, which a federal court can grant only if the applicant has exhausted state remedies or meets a listed exception. Exhaustion means the remedies available in the courts of the State have been used. A prisoner has not exhausted if state law still gives a right to raise the question by any available procedure (§ 2254(c)).
For any claim the state court decided on the merits, a federal court can grant relief only if the state decision was contrary to, or an unreasonable application of, clearly established federal law as determined by the U.S. Supreme Court, or was based on an unreasonable determination of the facts (§ 2254(d)). State court factual findings are presumed correct, and the applicant must rebut that presumption by clear and convincing evidence (§ 2254(e)(1)).
A different statute, 28 U.S.C. § 2241, sets out when the writ extends to a prisoner. It covers custody under the authority of the United States and custody in violation of the Constitution or laws of the United States (§ 2241(c)). Which statute fits a given detention is a question for counsel.
The federal one-year deadline and tolling
A one-year limitation period applies to a federal application by a person in custody under a state court judgment, under 28 U.S.C. § 2244(d)(1). The period runs from the latest of four dates. The first is when the judgment became final by the conclusion of direct review or the expiration of the time for seeking that review. The second is when a state-created impediment is removed, if the applicant was prevented from filing by that impediment. The third is when a newly recognized constitutional right applies retroactively on collateral review. The fourth is when the factual predicate of the claim could have been discovered through due diligence.
The statute excludes time while a properly filed application for state post-conviction or other collateral review is pending (§ 2244(d)(2)). It does not describe other pauses, so whether any other rule applies is a question for counsel and the court. Because the deadline is strict, counsel can calculate the specific dates in a case from the judgment and the filing history.
Records to gather before a habeas filing
The core records are the charging document, the judgment, the transcripts, the appellate filings and any earlier post-conviction papers. Gather them before deciding which filing fits the case.
- Charging documents and the judgment of conviction
- Plea forms, if any
- Trial and sentencing transcripts
- Appellate briefs and decisions
- Prior post-conviction filings and court docket sheets
To get copies, contact the clerk of the court that handled each proceeding and ask how to request records. Fees and turnaround times vary, so confirm them with the clerk. Once the record is assembled, check the applicable deadlines against the dates in the judgment and the filings.
State vs federal habeas corpus at a glance
The two systems differ on forum, governing statute, exhaustion, review standard and deadline.
| Forum | Governing statute | Exhaustion requirement | Standard of review | Deadline rule |
|---|---|---|---|---|
| State court petition | Varies by state; check the state statute | Varies by state; check the statute and court rules | Varies by state; check the statute | Varies by state; check the statute and court rules |
| Federal petition by a state prisoner | 28 U.S.C. § 2254 | Remedies available in state courts must be exhausted, subject to the exceptions in § 2254(b)(1)(B) (§ 2254(b)(1)(A)) | Deference to state merits decisions (§ 2254(d)); state factual findings presumed correct (§ 2254(e)(1)) | One-year limitation (§ 2244(d)(1)) |
| Federal petition under § 2241 | 28 U.S.C. § 2241 | Not addressed in the § 2241 text; check case law | Not addressed in the § 2241 text; check case law | § 2244(d) covers applications under a state court judgment; check the rules for other custody |
When to consult a licensed attorney
A licensed attorney can evaluate deadlines, claims and the choice between state and federal filings for a specific case. The reasons are practical. Exhaustion, the deference standard and the one-year clock interact, and a filing in one forum can affect what remains available in another. An attorney can also confirm the state rules, which vary by state.
No one can promise a particular result. Legal Experts AI does not provide legal advice and is not a law firm.
Frequently asked questions about habeas corpus petitions
The short answers below rely on the federal statutes cited above, and state rules are noted where they differ.
Is a writ of habeas corpus the same as an appeal?
No. A habeas petition asks whether custody is lawful, while a direct appeal reviews legal errors in the trial record. Whether facts outside that record can be considered depends on the claim and the procedural rules that apply.
When can a habeas corpus petition be filed?
It depends on the custody, the judgment and the procedural history. A state prisoner's federal petition cannot be granted unless state remedies have been exhausted, subject to the exceptions in § 2254(b)(1)(B), and a one-year period under § 2244(d) applies. State filing timing depends on state law.
What is the difference between state and federal habeas corpus?
State petitions are filed in state courts under state law, and the rules vary by state. Federal petitions by state prisoners are filed under 28 U.S.C. § 2254, which requires exhaustion of state remedies and sets a deferential review standard. The table above lists the differences.
What is the federal one-year deadline for habeas petitions?
For a person in custody under a state court judgment, § 2244(d)(1) sets a one-year limitation period. It runs from the latest of four trigger dates, and § 2244(d)(2) excludes time while a properly filed state collateral application is pending.
What does exhaustion of state remedies mean?
Exhaustion means the applicant has used the remedies available in the state courts before asking a federal court for relief under § 2254(b)(1)(A). A prisoner has not exhausted if state law still gives a right to raise the question by any available procedure, under § 2254(c).
Can a habeas petition present new evidence?
Sometimes, and the rules limit when. A federal court generally cannot hold an evidentiary hearing on a claim when the applicant failed to develop its factual basis in state court, unless the applicant meets the conditions in § 2254(e)(2). A second or successive federal application generally needs court of appeals authorization first, under § 2244(b)(3). Whether particular evidence can be considered depends on the claim and the court.
Does Legal Experts AI provide legal advice?
No. Legal Experts AI is a marketplace where attorneys and litigation teams find and retain expert witnesses. It does not provide legal advice and is not a law firm.
Should I get a lawyer for a habeas petition?
A licensed attorney can review the record, the deadlines and the choice between state and federal filing for a specific case. The rules are strict, so reviewing them early is worth considering.
Where attorneys can find expert witnesses for post-conviction cases
Attorneys and litigation teams can find and retain expert witnesses through Legal Experts AI, a marketplace for expert witnesses. A habeas petition may rely on expert affidavits or investigative findings, depending on the claim. For a plain definition, see expert witness definition.
To start, Get Matched with expert witnesses or browse expert witness profiles.




