The Writ of Habeas Corpus protects prison inmates from false imprisonment to ensure people are not thrown into jail unlawfully. Habeas corpus refers to the principle of freedom from unlawful detention.A habeas corpus petition cannot act as a second direct appeal. A writ of habeas corpus petition is a tool that individuals convicted of criminal offenses in California can use to challenge their imprisonment. Federal habeas corpus is a procedure under which a federal court may review the legality of an individual's incarceration. The writ of Habeas Corpus is the legal system's last line of defense against unlawful incarceration. The inmate may file a petition for writ of habeas corpus. Habeas corpus is a legal action in which a prisoner challenges the authority of the jail or prison to continue holding him. Such filed the habeas corpus petition No. XXXXX in the Court of. The "Great Writ" of habeas corpus is a fundamental right in the Constitution that protects against unlawful and indefinite imprisonment.