A writ of habeas corpus in California is where an inmate challenges their conviction or sentencing. The Writ of Habeas Corpus protects prison inmates from false imprisonment to ensure people are not thrown into jail unlawfully.Any order denying a petition for writ of habeas corpus must contain a brief statement of the reasons for the denial. 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 petition that an individual uses to challenge their conviction or sentence in California. Habeas corpus is a legal instrument that allows you to contest your incarceration, conviction, or sentencing conditions. This means you cannot use a habeas corpus petition to make the same argument that you previously raised in a direct appeal. The purpose of this order is to ensure that the detainee is not being held unlawfully or without sufficient cause. § 2255 is not a petition for a writ of habeas corpus, but it has the same effect. Therefore, it is still referred to as a habeas petition. 7.