Petition for a Writ of Habeas Corpus under 28 U.S.C. § 2241. In this video, David offers insight on how to file habeas corpus and compassionate release motions.A habeas corpus motion can allow you to defeat your criminal charges shortly after they are filed. Put simply, habeas corpus is a writ (petition) that can be used in a narrow set of circumstances to bring the case of a state prisoner. Writs of habeas corpus to produce prisoners to testify in Court will not be granted, except in cases in which they are parties. Included on this page are forms for filing civil complaints, private criminal complaints and notices of settlement when cases are privately resolved. Included on this page are forms for filing civil complaints, private criminal complaints and notices of settlement when cases are privately resolved. Generally, anyone detained or imprisoned can file a petition for a writ of habeas corpus in the United States. African Americans and slavery, and; enlistments in the military. In Philadelphia, the petition for writ of habeas corpus is more commonly called a Motion to Quash.