Habeas Corpus vs Mandamus
Two of the five constitutional writs — one frees the body from illegal detention, the other commands a public authority to do its legal duty.
Start here
Habeas corpus is a writ that commands the production of a person illegally detained and secures release if custody is unlawful; mandamus is a writ that commands a public authority to perform a legal duty it has unlawfully refused. Articles 32 and 226 empower courts to issue both among the five writs borrowed from English common law.
Habeas corpus is the speediest remedy against illegal detention — the court demands the detaining authority produce the person and justify custody. Mandamus is preventive/commanding: it tells a public official or body to perform a duty they unlawfully refuse. Neither writ is available in every situation — mandamus cannot run against the President or Governor in their personal capacity (Article 361).
Side-by-side comparison
| Feature | Habeas Corpus | Mandamus |
|---|---|---|
| Against private persons | Possible if de facto detention | Only if performing public duty |
| Against President/Governor | Not in personal capacity (Art. 361) | Generally excluded — personal immunity |
| Pre-condition | Detention must be shown; burden shifts to State | Legal duty must exist; no discretion to refuse |
| Alternative remedy | Often still maintainable (liberty) | May be refused if equally efficacious remedy exists |
| Emergency (Art. 359) | FR enforcement may be suspended — historic ADM Jabalpur debate | Same FR suspension framework applies to FR-linked mandamus |
| Typical use in PIL | Undertrial prisoners, missing persons custody | Pollution boards, municipal bodies, universities |
At a glance
Meaning
“Have the body”
“We command”
Target
Illegal detention / custody
Public authority failing public duty
Relief
Release from unlawful confinement
Order to act (or sometimes refrain)
Speed
Fastest writ — liberty at stake
Important but not emergency-speed
Midnight arrest vs withheld degree certificate
Ravi is picked up by police with no record. His family files habeas corpus — the court orders him produced within 24 hours. Separately, a graduate’s university refuses to issue a degree despite clearing exams. She may seek mandamus directing the public university (performing a public duty) to issue it — not habeas corpus, because no illegal detention is involved.
What this means for the exam
Illegal detention → habeas corpus. Refusal to perform public legal duty → mandamus.
Understand the difference
Habeas corpus and personal liberty
Article 21 protects life and personal liberty. Habeas corpus ensures any deprivation is according to procedure established by law. Post-Puttaswamy (2017), privacy and dignity reinforce strict scrutiny of detention. Even during emergencies, the debate on suspending access to courts for liberty claims remains an exam theme tied to Articles 20, 21, and 359.
Limits on mandamus
Mandamus cannot compel a public authority to do what the law does not require, nor control pure policy discretion. Courts issue it for non-performance of a clear statutory duty — issuing licenses due under rules, holding elections, publishing results — not to rewrite policy choices Parliament left discretionary.