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.The Writ of Habeas Corpus protects prison inmates from false imprisonment to ensure people are not thrown into jail unlawfully. A Writ of Habeas Corpus may be an option for you if you or someone you love is being held in jail, prison, or a mental health institution. The Writ of Habeas Corpus is a legal defense against unlawful incarceration. The writ of habeas corpus primarily acts as a writ of inquiry, issued to test the reasons or grounds for restraint and detention. Brought before a judge or court (PC 1473). The "Great Writ" of habeas corpus is a fundamental right in the Constitution that protects against unlawful and indefinite imprisonment. The top of this page. • For information about writs of habeas corpus, please see rules 4.550–4.552 of the California Rules of.