The "Great Writ" of habeas corpus is a fundamental right in the Constitution that protects against unlawful and indefinite imprisonment. 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, 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 judicial mandate to a prison official, usually the warden, ordering that an inmate be brought to the court. A prerogative writ used to challenge the validity of a person's detention, either in official custody (e.g. The writ of habeas corpus primarily acts as a writ of inquiry, issued to test the reasons or grounds for restraint and detention. To get a writ of habeas corpus, you must file a petition for a civil (not criminal) proceeding in either state or federal court. To get a writ of habeas corpus, you must file a petition for a civil (not criminal) proceeding in either state or federal court. Habeas petitions provide prisoners whose rights are being violated with a means of requesting assistance from a judge. LAW"). 3. Other ways of attacking your conviction include filing an appeal, or a state or federal writ of habeas corpus.