Understanding Habeas Corpus: How To Challenge Detention
By Oni Harton, Esq. | Reviewed by Canaan Suitt, J.D. | Last updated on August 6, 2026Habeas corpus is a legal procedure that allows people whom the government has detained to challenge what they believe is an unlawful detention. A habeas petition is one of the oldest and most important protections against wrongful detention. Habeas corpus principles are relatively straightforward; people use them to challenge detention by requiring the government to justify a person’s detention before a court.
Dating back to the times of the Magna Carta in the Thirteenth Century, the framers of the U.S. Constitution believed it was vital to include it in the founding document to preserve liberty, justice, and democracy. It’s located within the Suspension Clause of the U.S. Constitution.
You can seek a writ of habeas corpus in federal and state courts. For legal help in your situation, reach out to a constitutional law attorney.
What Is Habeas Corpus?
In Latin, habeas corpus means “you should have the body.” It means that a judge should have the detainee physically present to weigh the legality of their confinement. In most habeas cases, the petitioner must show that their custody violates the Constitution, federal law, or a treaty. If the court agrees, it can order relief, including release.
This legal procedure allows people who have been detained to challenge their detention in court. If an immigrant has been detained and believes the government lacks authority to detain them, the detained immigrant can petition the court for a release order. This remedy is not limited to United States citizens. Both citizens and noncitizens can petition.
A habeas corpus petition does not decide guilt or innocence; it asks whether the person is being held legally.
When Does Habeas Corpus Come up in Legal Matters?
There are many examples where habeas corpus is invoked. It most often arises in criminal cases, but it is not limited to criminal matters.
- Criminal convictions. The habeas corpus procedure can be used after all direct appeals and other ways for judicial review are exhausted. It’s common for an incarcerated individual to file a habeas petition to challenge constitutional violations, such as ineffective assistance of counsel or newly discovered evidence.
- Immigration detention. Individuals detained under immigration law may use habeas petitions to challenge prolonged detention or detention that is allegedly not authorized by statute or the Constitution. This could also involve cases where a person is detained without a bond hearing when one is required. In immigration cases, a petition is often filed under 28 U.S.C. § 2241 in the federal district court with jurisdiction over the facility where the person is held. An immigration judge may make custody determinations, such as bond, in immigration court, but a federal district court decides the habeas challenge to the legality of the detention.
- Unlawful imprisonment scenarios. If a prisoner is held in a detention facility past a lawful sentence or without proper charges, they may file a habeas petition for relief. This would also be the case in the event of mental health or civil commitment cases where the detention is contested.
- Federal vs. state petitions. Depending on what government authority holds the state or federal prisoner and what legal issue is involved, the habeas corpus procedure is available in both state and federal court.
In recent years, including following a 2025 Board of Immigration Appeals (BIA) policy change, individuals have filed habeas corpus petitions in situations where no bond hearing was provided. Other reasons include prolonged post-removal detention, mandatory detention designations, or ICE parole denied without an adequate basis.
Availability of Habeas Corpus
A variety of individuals may be able to claim relief through the habeas corpus procedure. These include
- Prisoners who claim their sentences are unlawful
- Immigration detainees
- People held before a trial
- Individuals in civil or psychiatric confinement
When a detained person cannot act for themselves, a family or “next friend” can sometimes file on their behalf. In general, anyone in custody who believes their detention violates the law or their constitutional rights is eligible to use the procedure.
A key requirement for the use of habeas corpus is that the person must be under some form of physical restraint or legal custody. In certain instances, this could also include those on parole or probation. Eligibility for a writ of habeas corpus generally depends on whether the person is in custody and has a valid legal basis to claim that the custody is unlawful.
What Do You Have To Prove or Show?
The central question in cases involving habeas corpus is whether the detention itself is unlawful. Common grounds for a petition include:
- Violation of constitutional rights under the Fifth Amendment or other Due Process rights
- Lack of jurisdiction by the detaining court
- Ineffective assistance of counsel
- New evidence that undermines the detention
- Indefinite detention or detention beyond the lawful time limit
The petitioner usually bears the burden of proving that the detention is unlawful. Courts require specific facts and evidence to support any arguments. These can take the form of court records and other evidence supported by clear legal arguments.
For a petition to be successful, it must follow all applicable procedural rules. In many criminal conviction cases, this includes meeting deadlines and, for state prisoners bringing federal habeas claims, exhausting available state-court remedies first.
Federal law also imposes strict limits on second or successive petitions. For example, a one-year filing deadline applies to many federal habeas petitions challenging state convictions under 28 U.S.C. § 2244(d), and to many motions challenging federal convictions under 28 U.S.C. § 2255(f).
Although rarely granted, habeas petitions have been a vital part of the American justice system. Most recently, these petitions have challenged the president’s use of the Alien Enemies Act of 1798, a law that, during a declared war or invasion, allows the federal government to detain and remove certain noncitizens tied to a hostile foreign nation.
Because the standards are exacting, an attorney experienced in constitutional law can make a meaningful difference.
Consult a Constitutional Law Attorney
You do not need an attorney to begin the habeas corpus process, but guidance from an experienced habeas or constitutional law attorney will strengthen your position. For legal help in your situation, reach out to a constitutional law attorney.
What do I do next?
Enter your location below to get connected with a qualified attorney today.Additional Constitutional Law articles
- Overview of Constitutional Law
- Can the President Impose Tariffs? Executive Authority and the Supreme Court
- Constitutional Rights in US Territorities: What Laws Apply?
- How Courts Decide Your Rights: Understanding the 3 Levels of Judicial Scrutiny
- Citizens Changing State Law: A State Guide to Ballot Initiatives and Referendums
At Super Lawyers, we know legal issues can be stressful and confusing. We are committed to providing you with reliable legal information in a way that is easy to understand. Our legal resources pages are created by experienced attorney writers and writers that specialize in legal content in consultation with the top attorneys that make our Super Lawyers lists. We strive to present information in a neutral and unbiased way, so that you can make informed decisions based on your legal circumstances.
Attorney directory searches
Helpful links
Find top lawyers with confidence
The Super Lawyers patented selection process is peer influenced and research driven, selecting the top 5% of attorneys to the Super Lawyers lists each year. We know lawyers and make it easy to connect with them.
Find a lawyer near you