If you want to challenge your immigration detention, you may use the form Petition for a Writ of Habeas Corpus under 28 U.S.C. § 2241 (For Immigration Matters). A federal 2255 motion is a form of habeas corpus relief through which an inmate can challenge their conviction or their sentence in federal court.Forms Find a national federal court form that can be used in all federal courts. To file a Section 2255 motion, you must be in custody and have exhausted all other available legal remedies, such as a direct criminal appeal. 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. It provides an expeditious remedy for correcting erroneous sentences without resort to habeas corpus. Federal habeas for a state prisoner…. § 2254, the Magistrate Judge ordered Petitioner to resubmit his petition on the form used to file a petition for writ of habeas corpus under 28 U.S.C. § 2254. Federal Writ of Habeas Corpus For Those In Federal Custody 28 USCA 2255. The Ohio courts affirmed his conviction and sentence, and denied his claims on post-conviction review.