The procedure for filing a petition for a writ of habeas corpus is spelled out in the CPLR Article 70. In United States law, habeas corpus is a recourse challenging the reasons or conditions of a person's confinement under color of law.The Habeas Corpus Act 1679 was an Act of Parliament passed during the reign of King Charles II that helped establish the name of that session as the Habeas. An act for the better securing the liberty of the subject, and for prevention of imprisonments beyond the seas, commonly called "the habeas corpus act." Federal habeas corpus is a procedure under which a federal court may review the legality of an individual's incarceration. Habeas Corpus, in the Federal Court, is a petition that claims that you are being detained against your US constitutional rights. Petition for a Writ of Habeas Corpus under 28 USC 2241. Category Representing Yourself (Pro Se). This writ itself originated in the 1300s, as a way to enforce the Magna Carta's guarantee that no free man could be imprisoned without due process of the law.