In this video, David offers insight on how to file habeas corpus and compassionate release motions. Petition for a Writ of Habeas Corpus under 28 USC § 2241.Form: PDF icon AO242.pdf. Federal habeas corpus is a procedure under which a federal court may review the legality of an individual's incarceration. This petition, called a writ of Habeas Corpus, is filed in Federal Court (US District Court ) whether you are serving time in a federal or state prison. In Philadelphia, the petition for writ of habeas corpus is more commonly called a Motion to Quash. This Chapter explains the writ of habeas corpus and lays out the procedures you will need to follow to petition for the writ. Attorney Brian Zeiger can work to review the specific facts of your case and help you apply for habeas corpus through the federal judicial system. The defendant then filed a pretrial writ of habeas corpus, arguing that the district magistrate court erred in finding a prima facie case. Huntingdon, Pennsylvania.