A writ of habeas corpus is used to bring a convicted party into court. The writ of habeas corpus is a court order which means, literally, "produce the body.What Is Habeas Corpus? Habeas corpus is a kind of petition that you can file in federal court to claim that your imprisonment violates federal law. The "Great Writ" of habeas corpus is a fundamental right in the Constitution that protects against unlawful and indefinite imprisonment. If the court finds that a person was detained illegally, that person must be set free. What Is Habeas Corpus? Habeas corpus is a kind of petition that you can file in federal court to claim that your imprisonment violates federal law. This petition, called a writ of Habeas Corpus, is filed in Federal Court (US District Court ) whether you are serving time in a federal or state prison. Original petition for a writ of habeas corpus before the Illinois Supreme Court.