1. The prescribed form for a Petition for Writ of Habeas Corpus for. State Prisoners filing under 28 U.S.C. §2241 is attached hereto.State courts may issue such writs to prisoner custodians to produce federal prisoners. Service. The issuing court will specify the party to execute the writ. Federal habeas corpus is a procedure under which a federal court may review the legality of an individual's incarceration. An application for a Writ of Habeas Corpus is filed when a person seeks relief from unlawful detention or imprisonment. The prescribed form for a Petition for Writ of Habeas Corpus for. 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? They can file a petition called a habeas corpus petition in a federal court, asking for a review of their case.