What is habeas corpus writ?
A writ of habeas corpus is a judicial mandate ordering that an inmate be brought to the court so it can be determined whether or not that person is imprisoned lawfully and whether or not he should be released from custody. A habeas corpus petition is a petition filed with a court by a person who objects to his own or someone else’s detention or imprisonment. The petition must show that the court ordering the detention or imprisonment made a legal or factual error. Habeas corpus petitions are usually filed by persons serving prison sentences.