Because the purpose of the petition is to gain the release of an unlawfully detained person, the reasons that justify the writ are narrowly defined. A writ of habeas corpus is a judicial mandate to a prison official, usually the warden, ordering that an inmate be brought to the court.The "Great Writ" of habeas corpus is a fundamental right in the Constitution that protects against unlawful and indefinite imprisonment. Habeas Corpus, in the Federal Court, is a petition that claims that you are being detained against your US constitutional rights. A Writ of Habeas Corpus is a civil proceeding that is available in both State and Federal Court to challenge the legality of imprisonment. Habeas Corpus means a demand to produce the body whether dead or alive. Thus, rather than examining a case for legal error, a habeas corpus proceeding examines whether any constitutional violations occurred at trial or sentencing. In United States law, habeas corpus is a recourse challenging the reasons or conditions of a person's confinement under color of law. Where do I file a notice of appeal? Where do I file a post-judgment motion?