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. 3. If you are incarcerated in a federal prison, you cannot file for state habeas corpus.You must file a petition for federal habeas corpus. 1. Notice of appeal 2. A Writ of Habeas Corpus is a civil proceeding that is available in both State and Federal Court to challenge the legality of imprisonment. 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. A federal writ of habeas corpus is a legal remedy available to state and federal prisoners who object to their detention or imprisonment. The Writ of Habeas Corpus protects prison inmates from false imprisonment to ensure people are not thrown into jail unlawfully. If you are a federal prisoner, you will not file a state post-conviction proceeding. If the Board denies parole, the prisoner can seek judicial review in a state habeas petition.