The Writ of Habeas Corpus protects prison inmates from false imprisonment to ensure people are not thrown into jail unlawfully. The inmate may file a petition for writ of habeas corpus.A federal writ of habeas corpus is a legal remedy available to state and federal prisoners who object to their detention or imprisonment. 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. A petition for writ of habeas corpus is a legal action that allows individuals to challenge their unlawful imprisonment or restraint. Prisoners can sometimes use a petition for writ of habeas corpus to challenge the legality of a criminal conviction or inhumane prison conditions. 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. A federal writ of habeas corpusmust be filed within one year and 90 days after losing a case in the California Supreme Court. A writ of habeas corpus is a powerful legal tool that allows individuals to challenge a criminal conviction or sentence. A Writ of Habeas Corpus is a civil proceeding that is available in both State and Federal Court to challenge the legality of imprisonment.