The procedure for filing a petition for a writ of habeas corpus is spelled out in the CPLR Article 70. A writ of habeas corpus is a judicial mandate to a prison official, usually the warden, ordering that an inmate be brought to the court.Petition for a Writ of Habeas Corpus Under 28 U.S.C. § 2241. Download. A seasoned New York habeas corpus lawyer can guide and represent you in the filing and litigation of a motion for a writ of habeas corpus. Respondent. WRIT OF 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. In busier counties, it can mean up to 23 weeks or longer. How to fill out the Petition for Writ of Habeas Corpus Instructions? A Writ of Habeas Corpus is a civil proceeding that is available in both State and Federal Court to challenge the legality of imprisonment. LAW"). 3. Other ways of attacking your conviction include filing an appeal, or a state or federal writ of habeas corpus.