New York Petition For Writ of Habeas Corpus Under 28 USC 2241 By Person In Custody is a legal document that is used to challenge the legality of a person's confinement or detention. This petition is filed by a person who is currently in custody in the state of New York and is seeking relief from the court. The petition must be filed in the court within the jurisdiction where the person is currently in custody. The petition must include the detainee’s name, the jurisdiction of the court, the reasons why the detention or confinement is illegal, and the relief that the petitioner is seeking. There are two types of New York Petition For Writ of Habeas Corpus Under 28 USC 2241 By Person In Custody — habeas corpus ad prosequendum, which is a writ issued to bring a prisoner before the court for a criminal trial, and habeas corpus ad testificandum, which is a writ issued to bring a prisoner before the court to give testimony in a civil or criminal trial.