When a family member is suddenly taken into custody, the first instinct is to “get bail”. But bail is not always the right tool. The choice between habeas corpus and regular bail turns on a single question: is the detention itself unlawful, or is the person lawfully arrested and simply seeking release pending trial? Habeas corpus attacks the legality of the detention; bail accepts that the custody is lawful and asks the court to release the accused on conditions. Picking the wrong remedy wastes precious days and can prejudice the case.
This explainer walks an ordinary reader through what each remedy actually does, when each one applies, and how a criminal lawyer decides which door to knock on first.
What Is the Habeas Corpus Writ in India?
“Habeas corpus” is Latin for “you shall have the body”. It is a constitutional writ — a direct order from a High Court (under Article 226 of the Constitution) or the Supreme Court (under Article 32) — commanding whoever holds a person in custody to physically produce that person before the court and justify the detention. If the authority cannot show a lawful basis, the court orders immediate release.
The writ is not concerned with guilt or innocence. It asks only one thing: is this person being held with legal authority? It is most often used where:
- A person is detained without being produced before a magistrate within the 24-hour limit (the safeguard recognised in Article 22 and the procedural provisions now found in the Bharatiya Nagarik Suraksha Sanhita, 2023, which has replaced the Code of Criminal Procedure, 1973).
- Someone is held under a preventive detention order that is procedurally defective.
- A person — often a woman, a child, or an elderly parent — is in private illegal confinement (for example, wrongful restraint by a spouse or relatives).
- A person has been picked up and the police deny holding them (“disappearance” cases).
Because it is a constitutional remedy, a habeas corpus petition can be filed quickly, is heard with urgency, and can be moved by the detenu or by a relative or friend on their behalf.
What Is Regular Bail?
Regular bail is the ordinary criminal-procedure remedy for a person who has already been arrested in a cognizable case and is in judicial or police custody. It does not question whether the arrest was legal; it accepts the custody and asks the court to release the accused — on a bond and conditions — while the investigation or trial continues.
The bail provisions historically sat in Sections 437 and 439 of the Code of Criminal Procedure, 1973. Under the new criminal code, these correspond broadly to the bail provisions of the Bharatiya Nagarik Suraksha Sanhita, 2023 (BNSS) — readers should verify the exact current section numbers, as the renumbering is recent. There are three commonly confused varieties:
- Regular bail — sought after arrest, when the person is in custody.
- Anticipatory bail — sought before arrest, by a person apprehending arrest in a non-bailable offence.
- Interim bail — a short, temporary release granted while a regular or anticipatory bail application is pending.
A bail court weighs factors such as the gravity of the offence, the likelihood of the accused fleeing, the risk of tampering with evidence or influencing witnesses, and the accused’s antecedents. Crucially, the court presumes the arrest itself was lawful. For more on protection sought before arrest, see our guide to anticipatory bail in India.
Habeas Corpus vs Regular Bail: The Core Difference
The cleanest way to see the difference between bail and habeas corpus is side by side.
| Feature | Habeas Corpus | Regular Bail |
|---|---|---|
| What it challenges | The legality of the detention itself | Nothing about legality — accepts lawful custody |
| Underlying question | “Is this person held with legal authority?” | “Should a lawfully arrested person be released pending trial?” |
| Legal basis | Article 32 (Supreme Court) / Article 226 (High Court) | Bail provisions of the BNSS, 2023 (formerly Ss. 437/439 CrPC) |
| Where filed | High Court or Supreme Court | Trial court / Sessions Court first; then High Court |
| Who can file | The detenu or a relative/friend | Usually the accused (through counsel) |
| Typical use | Illegal/arbitrary detention, missing 24-hour production, private confinement, defective preventive detention | Person properly arrested in a cognizable case seeking release |
| Outcome if successful | Immediate, unconditional release | Release on bond with conditions |
| Effect on the case | Detention declared unlawful; arrest may be void | Case continues; accused faces trial on bail |
The single most important takeaway: habeas corpus says the custody should never have happened; bail accepts the custody and seeks release. Use the wrong one and the court may simply tell you that you have approached the wrong forum.
When to File Habeas Corpus Instead of Bail
A writ petition for unlawful detention is the right remedy when the foundation of the custody is missing or defective. Practical signals that habeas corpus — not bail — is the answer:
- No production before a magistrate within 24 hours. The 24-hour rule (excluding travel time) is a constitutional safeguard. If it is breached, the continued detention is prima facie illegal.
- The police deny custody. If the police say they are not holding the person but the family has reason to believe otherwise, only a writ court can compel them to produce the body.
- Private illegal confinement. Where there is no arrest at all — say a person is being held against their will by relatives — bail is irrelevant; habeas corpus is the route.
- Procedurally defective preventive detention. Preventive detention orders must follow strict procedure; a defect can be challenged by writ.
- No FIR, no remand order, no legal authority for the custody.
A note of caution courts repeatedly stress: habeas corpus is not a substitute for bail. Once a person has been lawfully arrested and remanded by a competent magistrate, the proper remedy is a bail application, not a writ. Filing a writ in those circumstances usually fails. Indian courts have consistently held that where there is a valid remand order, the writ of habeas corpus generally does not lie — the precise scope is fact-sensitive, so verify the specific authorities with an advocate. For the mechanics of moving a writ court, see our note on how to file a writ petition in the High Court.
When Regular Bail Is the Right Remedy
Regular bail is the correct — and usually the only sensible — remedy when:
- There is a valid FIR in a cognizable offence and a lawful arrest.
- The accused has been produced before a magistrate and remanded.
- The custody is procedurally proper, and the real question is simply release pending trial.
In the vast majority of everyday criminal cases, the arrest is lawful and bail is the correct route. Habeas corpus is the exception, reserved for genuine illegality. A good criminal lawyer will not file a writ merely to look aggressive; doing so can irritate the court and delay the bail the client actually needs. Where the custody itself is sound but a statutory time limit on filing the chargesheet is missed, a different route opens — see our explainer on default bail.
What about anticipatory bail?
If a person has not yet been arrested but fears arrest in a non-bailable matter, neither regular bail nor habeas corpus fits — the remedy is anticipatory bail. This is a third door, and confusing it with the other two is a common and costly mistake.
How a Lawyer Chooses the Remedy: A Quick Decision Path
| Situation | Likely Remedy |
|---|---|
| Person not yet arrested, fears arrest | Anticipatory bail |
| Lawfully arrested, remanded, in custody | Regular bail |
| Detained, not produced within 24 hours | Habeas corpus |
| Police deny holding the person | Habeas corpus |
| Held privately, no arrest at all | Habeas corpus |
| Defective preventive-detention order | Habeas corpus (writ) |
The honest reality is that these situations can overlap, and the facts on the ground change by the hour. A relative who suspects an unlawful detention should contact a lawyer immediately rather than guessing — the first 24 to 48 hours are often decisive. This is the kind of urgent question handled within criminal defence and prosecution practice.
A Word on the New Criminal Codes (BNSS / BNS)
From mid-2024, India’s criminal laws were overhauled: the Code of Criminal Procedure, 1973 (CrPC) was replaced by the Bharatiya Nagarik Suraksha Sanhita, 2023 (BNSS), and the Indian Penal Code, 1860 (IPC) by the Bharatiya Nyaya Sanhita, 2023 (BNS). The bail framework moved into the BNSS with renumbered sections, while habeas corpus, being a constitutional remedy under Articles 32 and 226, is unaffected by this change.
Because the section numbers are new and still being settled in practice, always verify the current section that applies to your facts with a practising advocate or on the official text before relying on any number you read online.
Frequently Asked Questions
Can I file habeas corpus instead of bail to get my relative out faster?
Generally no. If your relative has been lawfully arrested and remanded by a magistrate, the correct remedy is a bail application. Habeas corpus is not a shortcut around bail; courts routinely reject writs filed where a valid remand order exists.
Who can file a habeas corpus petition?
The detained person can file it, but so can a relative, friend, or even a concerned third party on their behalf — which is vital when the detenu has no access to a lawyer or phone.
Which court hears a habeas corpus petition?
A High Court under Article 226 or the Supreme Court under Article 32. Bail, by contrast, usually starts at the trial or Sessions Court before going up to the High Court.
Is habeas corpus available against private individuals?
Yes. It is most commonly associated with State detention, but it can be used where a person is illegally confined by private parties — for instance, an adult held against their will by family members.
What happens if a habeas corpus petition succeeds?
The court orders the immediate release of the person, and the detention is declared unlawful. There are no bail conditions because the custody itself was illegal.
Does winning habeas corpus mean the criminal case is over?
Not necessarily. If there is an underlying offence, fresh and lawful proceedings can still follow. Habeas corpus deals with the legality of the present detention, not the merits of any charge.
My family member fears arrest but hasn't been arrested. What should we do?
That is the situation for anticipatory bail, not habeas corpus or regular bail. Speak to a criminal lawyer before any arrest happens.
This article is for general informational purposes only and does not constitute legal advice. Laws change and every situation is different; please consult a qualified advocate about your specific matter.



