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. Habeas corpus, in other words, is a petition that asks the court to completely dismiss the charges against you over the Prosecutor's objection.This Chapter explains an important right—the writ of habeas corpus. The privilege of the writ of habeas corpus shall not be suspended, unless when in the case of rebellion or invasion the public safety may require it. A writ of habeas corpus is used to bring a prisoner or other detainee (e.g. The writ of habeas corpus is a legal order requiring a person holding another person to produce that individual before a court or judge. 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 means you may seek a writ of mandamus, writ of prohibition, or a writ of habeas corpus directly from the Supreme Court of. Pennsylvania. Courts to be open; suits against the Commonwealth. 12.