If you want to challenge a federal judgment that imposed a sentence to be served in the future, you should file a motion under 28 U.S.C. § 2255 in the federal. Federal habeas corpus is a procedure under which a federal court may review the legality of an individual's incarceration.These rules apply to all civil proceedings involved in cases traditionally considered tort, contract, replevin, or equity actions, except small claims actions. "Habeas corpus" is a writ utilized to bring a person before a court, most frequently to ensure that a person' s imprisonment or detention is not illegal. 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. The jury shall file a verdict slip with the clerk upon the return of the verdict. A § 2254 petition is a motion for a writ of habeas corpus.