A Writ of Habeas Corpus is one of the primary ways of obtaining a client's freedom based on his or her actual innocence. A petition for writ of habeas corpus is a legal action that allows individuals to challenge their unlawful imprisonment or restraint.Simply put, a writ of habeas corpus calls into question the continued incarceration of an individual. Habeas corpus is a legal instrument that allows you to contest your incarceration, conviction, or sentencing conditions. The Writ of Habeas Corpus protects prison inmates from false imprisonment to ensure people are not thrown into jail unlawfully. 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. Habeas petitions provide prisoners whose rights are being violated with a means of requesting assistance from a judge. The U.S. Supreme Court interprets the Constitution, which means it defines constitutional rights and violations in the cases it decides. The Writ of Habeas Corpus protects prison inmates from false imprisonment to ensure people are not thrown into jail unlawfully. To be allowed to petition for a Writ of Habeas Corpus, you must first "exhaust your remedies.