A Writ of Habeas Corpus is a civil proceeding that is available in both State and Federal Court to challenge the legality of imprisonment. Orlando filed a petition for a writ of habeas corpus, again alleging that McGinn's testimony violated his confrontation right.Seeking a writ of habeas corpus pursuant to 28 U.S.C. § 2254 (Keyes III) and a petition seeking a writ of habeas corpus pursuant to 28 U.S.C. § 2241 (Keyes IV). Abuse in the writ of habeas corpus. William Evans petitions this Court for a writ of habeas corpus pursuant to 28 U.S.C. § 2254, challenging his 1992 state court convictions on robbery charges. To get a writ of habeas corpus, you must file a petition for a civil (not criminal) proceeding in either state or federal court. The cases included here are cited as examples only and do not represent an exhaustive search of the case law in all federal circuits. If a detainee or inmate feels that his constitutional rights in the preceding amendments have been violated, he can file habeas corpus. To get a writ of habeas corpus, you must file a petition for a civil (not criminal) proceeding in either state or federal court. A Writ of Habeas Corpus is a civil proceeding that is available in both State and Federal Court to challenge the legality of imprisonment.