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.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. It provides an expeditious remedy for correcting erroneous sentences without resort to habeas corpus. This handbook explains what a '2255' motion is, the grounds for a '2255 motion', the mechanics of the motion, and the procedures to follow. Person incarcerated in federal prison could file a habeas corpus petition once his conviction became final. The forms listed below are used in civil and criminal cases in the Superior Court. They are for lawyers and for people who do not have lawyers. (d) An appeal may be taken to the court of appeals from the order entered on the motion as from a final judgment on application for a writ of habeas corpus. In the due process provision of the fifth amendment.