The Writ of Habeas Corpus demands that requires a prisoner must go before the court to determine if there is lawful authority to detain the prisoner. Federal habeas corpus is a procedure under which a federal court may review the legality of an individual's incarceration.Habeas corpus is a kind of petition that you can file in federal court to claim that your imprisonment violates federal law. A Writ of Habeas Corpus is a motion which is filed most frequently to ensure that a Defendant's imprisonment or detention is not illegal. A habeas petition may only be filed on behalf of a person who is "in custody" pursuant to the judgment of a State Court. Rule 32 Proceedings. Notes of Advisory Committee on Rules—1979 Amendment. REAL ID Act of 2005.