Habeas Corpus Petitions Habeas corpus is a kind of petition that you can file in federal court to claim that your imprisonment violates federal law, which includes federal statutes, and the U.S. Constitution.  Whether you are a state or federal prisoner, a federal habeas petition claims that your imprisonment is illegal because your arrest, trial, or sentence violated federal law. …