The procedure for filing a petition for a writ of habeas corpus is spelled out in the CPLR Article 70. Habeas corpus is a remedy for violations of constitutional rights, such as ineffective assistance of counsel.The "Great Writ" of habeas corpus is a fundamental right in the Constitution that protects against unlawful and indefinite imprisonment. In United States law, habeas corpus is a recourse challenging the reasons or conditions of a person's confinement under color of law. A writ of habeas corpus is used to bring a prisoner before the court to determine if the person's imprisonment or detention is lawful. Habeas Corpus, in the Federal Court, is a petition that claims that you are being detained against your US constitutional rights. Attached are the forms you will need to file a petition for a writ of habeas corpus. In a petition for habeas corpus, a prisoner (or another interested party) raises doubts about the legality of his or her imprisonment. Restrained in violation of the Constitution, or of any treaty or law of the United States. They are not allowed to fill out any forms for you or to give you free copies of documents.