Habeas corpus is a Latin term meaning "you have the body". It is a writ (court order) which directs the law enforcement officials who have custody of a prisoner to appear in court with the prisoner in order to determine the legality of the prisoner's confinement. Habeas corpus petitions are commonly used when a prisoner claims illegal confinement, such as holding a person without charges, when due process obviously has been denied, bail is excessive, parole has been granted, an accused has been improperly surrendered by the bail bondsman or probation has been unjustly denied. A petition for habeus corpus may be based on an error of fact or error of law. However, the determination made is whether due process rights were violated, not whether the prisoner is guilty.
Another name for Habeus Corpus is Habs-e-Bay Ja.. A writ of Habeas Corpus is filed under section 491 of Criminal Procedure Code 1898. The proper forum is the session court for filing this writ as it has jurisdiction to look into the matter. The SHO of the police station which is located in the vicinity of the place where the person is under illegal confinement is made party in the same writ. As a result the illegally confined person is brought to the court and his/her statement is recorded. In the light of that very statement the Writ is disposed off by the session judge.. That is the procedure in this writ.