There are two prerequisites for habeas review: the petitioner must be in custody when the petition is filed, and a prisoner who is held in state government custody must have exhausted all state remedies, including state appellate review.
Habeas corpus is one of the earliest common law writs. In its simplest form a writ of habeas corpus requires that a person who is in custody be brought before a judge or court and that they be able to challenge that custody. The writ of habeas corpus is used to attack an unlawful detention or illegal imprisonment.
A Writ of Habeas Corpus is usually filed by submitting a Petition, a Memorandum of Points and Authorities, a Declaration from the defendant, and other evidence which supports the Writ of Habeas Corpus. The Memorandum of Points of Authorities is a legal memorandum, which contains the legal arguments of the defendant.
(b) An application for writ of habeas corpus filed after final conviction in a felony case, other than a case in which the death penalty is imposed, must be filed with the clerk of the court in which the conviction being challenged was obtained, and the clerk shall assign the application to that court.
Federal habeas corpus is a procedure under which a federal court may review the legality of an individual's incarceration. It is most often the stage of the criminal appellate process that follows direct appeal and any available state collateral review. The law in the area is an intricate weave of statute and case law.
State every ground (reason) that supports your claim that you are being held in violation of the Constitution, laws, or treaties of the United States. Attach additional pages if you have more than four grounds. State the facts supporting each ground. Any legal arguments must be submitted in a separate memorandum.
Generally, one cannot file a writ of habeas corpus unless they show the government has detained them. State prisoners cannot file a federal writ unless they exhaust all available state remedies. The federal court will likely dismiss the writ if the defendant fails to exhaust all available remedies.