The writ of habeas corpus primarily acts as a writ of inquiry, issued to test the reasons or grounds for restraint and detention. Doe continues to be held in the King County Correctional Facility as of the submission of this writ.An example of a petition for habeas corpus in the U.S. occurred in the 2009 case Knowles v. Mirzayance. Though subject to different rules, incarcerated people in both state or federal custody may petition for a federal writ of habeas corpus. What Is Habeas Corpus? On all forms, ill out the caption (the top portion of each form naming the county, parties involved, and case number). A writ of habeas corpus is used to determine if a state's detention of a prisoner is valid. Federal habeas corpus is a procedure under which a federal court may review the legality of an individual's incarceration. Habeas corpus means demand of body. Any prisoner, or another person acting on their behalf, may petition the court, or a judge, for a writ of habeas corpus.