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). If petitioner seeks to attack a sentence to be served in the future under a federal judgment, petitioner should file a motion under 28 U.S.C. § 2255 in the.A Section 2255 motion must be filed in the district where the prisoner was convicted and sentenced. It provides an expeditious remedy for correcting erroneous sentences without resort to habeas corpus. Before you can file a motion under §2255, you must be in custody under federal law. Petitioner is a federal prisoner proceeding pro se with a petition for writ of habeas corpus pursuant to 28 U.S.C. § 2241. Publications Unit, Office of the Federal Register. Assembly Concurrent Resolution No. 1–Assemblymen Dini and Bergevin. 0932 Trial Court Trust Fund. Usage fees may apply.