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). Copies of the form and instructions for filing can be obtained from the District Court's website here.The petition should be filed in the court of conviction. Generally, a 2255 federal habeas petition must be filed within a year after your federal conviction became final. It provides an expeditious remedy for correcting erroneous sentences without resort to habeas corpus. A Section 2255 motion must be filed in the district where the prisoner was convicted and sentenced. 83-16.1 Court Forms. Appeals; habeas corpus § 2255; INS petitions to stay; deportation and prison transfers; clemency petitions. Distribute the Federal Criminal Law. News. Assembly Concurrent Resolution No. 1–Assemblymen Dini and Bergevin.