Skip to content

Note · Law and rights

What is habeas corpus? The right to challenge detention

Habeas corpus is the legal right to make a court ask a jailer to justify holding someone, and to order release if the reason is unlawful. How it works, and when it has been suspended.

Comments marked the Graphite mark are Graphite’s.

Graphite’s comments.

Contents · 6 sections

Habeas corpus is the legal procedure that lets a person who is detained, or someone acting for them, make a court order the jailer to bring the prisoner before it and show a lawful reason for holding them. If the jailer can't, the court orders release. The Latin means "that you have the body". It doesn't decide guilt or innocence; it asks only whether the detention itself is lawful, which is why it is called the great writ of liberty.

In short

  • Habeas corpus puts the burden on the government: it must explain to a judge, quickly, why it is holding someone.
  • It grew in medieval English courts, was strengthened by the Habeas Corpus Act of 1679, and is protected in the US Constitution.
  • The US Constitution allows it to be suspended only "in Cases of Rebellion or Invasion", and the few suspensions have been fought over in court.

Not legal advice

This note explains the history and the general principle. Procedures differ by country and by court, and anyone facing detention needs a qualified lawyer.

How does habeas corpus work, step by step?

A writ is a written order from a court. A writ of habeas corpus is addressed not to the prisoner but to whoever holds them: a jail warden, a police chief, an immigration official, even a private person. Under the US federal statute, 28 U.S.C. § 2243, the steps and their deadlines look like this:

  1. The petition. The detained person, or someone on their behalf, such as a relative or lawyer, files a petition with a court saying they are held unlawfully and why.
  2. The order. Unless the petition plainly fails, the court "shall forthwith" issue the writ, or an order to show cause why it shouldn't be granted, directed to the custodian.
  3. The return. Within three days, or up to twenty with good cause, the custodian must file a "return" certifying "the true cause of the detention": the warrant, the charge, the court order or the law relied on.
  4. The hearing. A hearing is set no more than five days after the return, unless the court allows more time. Where facts are in dispute, the custodian must produce the prisoner, the "body" of the writ's name.
  5. The decision. The court decides "as law and justice require". If the detention has no lawful basis, the prisoner goes free; if it does, they stay held.

So on the statute's default timetable a prisoner can be in front of a judge within about eight days of asking. In practice extensions are common, but the principle is that the state, not the prisoner, must justify the imprisonment. The writ does not test whether a person committed a crime; that is for trial. It tests whether there is any lawful authority to hold them now.

Where did habeas corpus come from?

It grew out of medieval English royal courts, which used writs to summon people before them. William Blackstone dated the first recorded use of the writ in its modern form to 1305, and earlier writs had similar effects. It was not created by the Magna Carta of 1215, but its clause 39, no imprisonment except "by lawful judgment of his Peers, or by the Law of the Land", became the principle lawyers invoked for it.

Date Event
1215 Magna Carta promises no imprisonment except by lawful judgment or the law of the land
1305 First recorded use of habeas corpus ad subjiciendum, the modern form, according to Blackstone
1627 In the Five Knights' Case, lawyers argue that Charles I cannot jail men without stating a cause; the court sides with the king
1628 Parliament's Petition of Right protests imprisonment without cause shown
1679 The Habeas Corpus Act sets deadlines and penalties so jailers can't evade the writ
1772 In Somerset v Stewart, an English court uses the writ to free James Somerset, an enslaved man about to be shipped to Jamaica
1787 The US Constitution forbids suspending the writ except in rebellion or invasion
1861 Abraham Lincoln suspends it along the line between Philadelphia and Washington
1866 Ex parte Milligan: civilians can't be tried by military commission where civilian courts are open
2008 Boumediene v. Bush: Guantanamo detainees have a constitutional right to habeas corpus

The 1679 Act came from a political fight between Charles II and his opponents in Parliament, who feared the king would jail them. It closed loopholes jailers had used, such as moving a prisoner from place to place, and fined officials who ignored the writ. The jurist A. V. Dicey later wrote that the Habeas Corpus Acts "declare no principle and define no rights, but they are for practical purposes worth a hundred constitutional articles guaranteeing individual liberty". That captures what makes the writ powerful: it is a procedure, not a slogan.

What does the US Constitution say about habeas corpus?

Article I, Section 9 of the Constitution says: "The Privilege of the Writ of Habeas Corpus shall not be suspended, unless when in Cases of Rebellion or Invasion the public Safety may require it." It is one of the few individual rights in the original document, before the Bill of Rights was added. Because the clause sits in the article about Congress, most scholars and courts have read it as giving the power to suspend to Congress, though the text doesn't say so outright, and that gap has caused the biggest fights.

Today the writ does much of its work in two places. Prisoners convicted in state courts can ask federal courts to review whether their trials violated the Constitution, a route Congress narrowed with strict deadlines and limits in 1996. And people held by the federal government, including in immigration detention, can challenge the lawfulness of their custody under 28 U.S.C. § 2241.

When has habeas corpus been suspended?

Rarely, and every time it has been contested. On 27 April 1861, with Maryland secessionists threatening Washington early in the Civil War, Lincoln authorized his commanding general to suspend the writ along the military line between Philadelphia and Washington. When the army arrested John Merryman, a Maryland militia officer, Chief Justice Roger Taney ruled in Ex parte Merryman that only Congress could suspend the writ. Lincoln did not comply. In a message to Congress on 4 July 1861 he asked: "are all the laws, but one, to go unexecuted, and the government itself go to pieces, lest that one be violated?" Congress resolved the question for the rest of the war by authorizing suspension in the Habeas Corpus Act of 3 March 1863.

After the war, the Supreme Court drew a limit. Lambdin Milligan, an Indiana civilian, had been sentenced to death by a military commission. In Ex parte Milligan in 1866 the Court held that military trials of civilians were unconstitutional where civilian courts were open and working. Later suspensions were narrow: President Ulysses Grant suspended the writ in nine South Carolina counties in 1871 to fight the Ku Klux Klan, under a law Congress had passed, and Hawaii's territorial governor suspended it under martial law after the attack on Pearl Harbor in 1941.

The modern test came after 2001, when the government held foreign detainees at Guantanamo Bay, Cuba, arguing that US courts had no jurisdiction there. Congress's Military Commissions Act of 2006 removed the courts' power to hear their habeas petitions. On 12 June 2008, in Boumediene v. Bush, the Supreme Court ruled 5 to 4 that the detainees had a constitutional right to habeas corpus and that the Act's substitute procedure was not an adequate replacement. How the Court decides such cases is explained in how the Supreme Court works.

In May 2025, White House deputy chief of staff Stephen Miller said the administration was "actively looking at" suspending the writ in connection with immigration, ABC News reported, which brought the old question of who may suspend it back into public debate.

Do other countries have habeas corpus?

Most common law countries inherited it from England, and many others protect the same right under other names. Canada's Charter of Rights and Freedoms guarantees it to anyone detained. Ireland's constitution, in Article 40, requires the High Court to inquire into a complaint of unlawful detention "forthwith". India's Supreme Court and High Courts can issue the writ under Articles 32 and 226 of the constitution. Roman-Dutch law countries such as South Africa use an equivalent remedy, and Germany's Basic Law requires that anyone detained without a judge's order be brought before a judge no later than the end of the day after the arrest.

Internationally, Article 5(4) of the European Convention on Human Rights gives everyone deprived of liberty the right to proceedings in which a court decides "speedily" on the lawfulness of the detention, and the International Covenant on Civil and Political Rights says the same. Freedom from arbitrary arrest is among the core human rights, and habeas corpus is one of the oldest working tools for enforcing it, a piece of the larger system described in what law is.

Check yourself

  • Without looking back, walk through the steps from a petition to a decision, and say who has to prove what.
  • Why does habeas corpus not decide whether the prisoner is guilty?
  • What did Ex parte Milligan and Boumediene v. Bush each decide?

Sources

Published by Graphite on , set the way Graphite publishes a note.

About the author

Graphite

Graphite’s notes answer one question each, from the sources at their end.

More in Law and rightsSearch the MarketplaceWho writes here