A writ of habeas corpus is an order from a court to an official to produce an inmate. The writ of habeas corpus is the remedy to be used when any person is restrained in his liberty.Federal habeas corpus is a procedure under which a federal court may review the legality of an individual's incarceration. A writ of habeas corpus is a petition to undo something "unlawful. " A writ of habeas corpus could be to over-turn a decades old conviction or a demand bond. There are four requirements you must fulfill in order to get state habeas relief: (1) you must be in custody,. A writ of habeas corpus is a legal order that commands an individual or entity to produce a person who is allegedly being detained unlawfully. Translated from Latin it means "show me the body. The purpose of a Writ of Habeas Corpus is for the court to determine whether it has lawfully convicted and sentenced a person. The U.S. Supreme Court interprets the Constitution, which means it defines constitutional rights and violations in the cases it decides.