writ of habeas corpus directs a person, usually a prison warden, to produce the prisoner and justify the prisoner's detention. If the prisoner argues successfully that the incarceration is in violation of a constitutional right, the court may order the prisoner's release. Habeas corpus relief also may be used to obtain custody of a child or to gain the release of a detained person who is insane, is a drug addict, or has an infectious disease. Usually, however, it is a response to imprisonment by the criminal justice system.
A writ of habeas corpus is authorized by statute in federal courts and in all state courts. An inmate in state or federal prison asks for the writ by filing a petition with the court that sentenced him or her. In most states, and in federal courts, the inmate is given the opportunity to present a short oral argument in a hearing before the court. He or she also may receive an evidentiary hearing to establish evidence for the petition.
The habeas corpus concept was first expressed in the Magna Charta, a constitutional document forced on King John by English landowners at Runnymede on June 15, 1215. Among the liberties declared in the Magna Charta was that "No free man shall be seized, or imprisoned, or disseised, or outlawed, or exiled, or injured in any way, nor will we enter on him or send against him except by the lawful judgment of his peers, or by the law of the land." This principle evolved to mean that no person should be deprived of freedom without Due Process of Law.
The writ of habeas corpus was first used by the common-law courts in thirteenth- and fourteenth-century England. These courts, composed of legal professionals, were in competition with feudal courts, which were controlled by local landowners, or "lords." The feudal courts lacked procedural consistency, and on that basis, the common-law courts began to issue writs