A Writ of Habeas Corpus is one of the primary ways of obtaining a client's freedom based on his or her actual innocence. The writ of habeas corpus primarily acts as a writ of inquiry, issued to test the reasons or grounds for restraint and detention.The writ of habeas corpus, also known as the Great Writ, is a U.S. legal process that determines whether an offender's imprisonment is valid. A habeas corpus petition cannot act as a second direct appeal. The writ of habeas corpus is the fundamental instrument for safeguarding individual freedom against arbitrary and lawless government action. 2. Generally speaking, the writ of habeas corpus is available in any case where the trial court has acted in excess of its jurisdiction. Habeas corpus is a legal instrument that allows you to contest your incarceration, conviction, or sentencing conditions. If the petitioner loses in the superior. Generally, an individual seeking to challenge his or her criminal conviction through a habeas petition must do so in a "timely fashion. To get a writ of habeas corpus, you must file a petition for a civil (not criminal) proceeding in either state or federal court.