Instructions and form for filing a petition for writ of habeas corpus under 28 USC § 2254. This FindLaw article explains the origins of the writ of habeas corpus, how to file, and limitations on filing.Filing the petition: An attorney can properly prepare and file the petition for writ of habeas corpus in the Circuit Court for Baltimore County, Maryland. Habeas corpus means demand of body. To obtain a writ of habeas corpus, you must show the court that you are in custody in violation of the Constitution or laws of the United States. Federal habeas corpus is a procedure under which a federal court may review the legality of an individual's incarceration. This article provides briefly summarizes the process for appealing a civil case from the circuit court to the Appellate Court. Federal prisoners in US Marshals custody may lawfully be transferred to the custody of a state or local government pursuant to a state writ of ad prosequendum. (Full name and address of respondent). Respondent. 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.