Habeas Corpus, in the Federal Court, is a petition that claims that you are being detained against your US constitutional rights. To get a writ of habeas corpus, you must file a petition for a civil (not criminal) proceeding in either state or federal court.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 is a civil proceeding that is available in both State and Federal Court to challenge the legality of imprisonment. The Writ of Habeas Corpus is a legal defense against unlawful incarceration. A habeas corpus petition in California allows you to challenge your conviction or sentencing. You can file it only after exhausting all criminal appeals. The "Great Writ" of habeas corpus is a fundamental right in the Constitution that protects against unlawful and indefinite imprisonment. If you want information about federal habeas corpus, send a request to Prison Law Office, General Delivery, San. See rules 4.5504.552 of the California Rules of.