When you file a petition for a Writ of Habeas Corpus, you are asking the court to order the government agency to appear and bring you before the court. A petition for writ of habeas corpus is a legal action that allows individuals to challenge their unlawful imprisonment or restraint.Any order denying a petition for writ of habeas corpus must contain a brief statement of the reasons for the denial. The Writ of Habeas Corpus protects prison inmates from false imprisonment to ensure people are not thrown into jail unlawfully. The writ of Habeas Corpus is the legal system's last line of defense against unlawful incarceration. Generally, an individual seeking to challenge his or her criminal conviction through a habeas petition must do so in a "timely fashion. Latin for "that you have the body. If you want information about federal habeas corpus, send a request to Prison Law Office, General Delivery, San. Habeas petitions are typically the final step in a criminal case once the inmate has exhausted the appeals process and any other legal remedies.