Petition for Writ of Habeas Corpus. Habeas Corpus, in the Federal Court, is a petition that claims that you are being detained against your US constitutional rights.Any defendant who has been convicted of a New York state crime in a proceeding should be aware of their right to file a petition for a 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. To speak with a Habeas Corpus proceedings lawyer in NYC about your case, contact Protass Law PLLC right away at 212-455-0335. Any prisoner, or another person acting on their behalf, may petition the court, or a judge, for a writ of habeas corpus. Petition in the superior court, you should file it in the county that made the order. The person served with the writ, whether named in the writ or not, is required to make a return to the writ. 3. Other ways of attacking your conviction include filing an appeal, or a state or federal writ of habeas corpus. Department of Correction,. Respondent.