The following steps should be followed when filing a Petition for Writ of Habeas Corpus. 1. Go to Civil on the blue bar located at the top of the screen.Application And Writ Of Habeas Corpus Ad Prosequendum PDF, 204 KB. These files may not be suitable for users of assistive technology. 1. The petition for writ of habeas corpus form is designed to help you prepare a petition seeking relief pursuant to 28 U.S.C. § 2254. Petitioner should seek the proper forms from the Clerk of that district and file a habeas petition in the appropriate district. Federal habeas corpus is a procedure under which a federal court may review the legality of an individual's incarceration. Federal prisoners in US Marshals custody may lawfully be transferred to the custody of a state or local government pursuant to a state writ of ad prosequendum. If Petitioner wishes to pursue a habeas petition, he should seek the proper forms from the Clerk of that district and file a habeas petition there. First, a U.S.C. § 2254 allows us to file a petition for Habeas Corpus when the client is in custody under sentence of a state court and is in a state prison. A 2254 petition must be filed in the federal district court that has jurisdiction over the county where the conviction occurred.