The Writ of Habeas Corpus demands that requires a prisoner must go before the court to determine if there is lawful authority to detain the prisoner. Prisoners can sometimes use a petition for writ of habeas corpus to challenge the legality of a criminal conviction or inhumane prison conditions.Who May Use This Form. 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. Immigration law has many technical words. Here is a list of some words you will see in this guide and a short explanation of what they mean. The "Great Writ" of habeas corpus is a fundamental right in the Constitution that protects against unlawful and indefinite imprisonment. In many countries, authorities may incarcerate someone for months or years without charging them. STEP 2: Fill out the "Summons" form.