Grounds for a writ of habeas corpus in New York exist when a person is unlawfully imprisoned or detained. A Writ of Habeas Corpus is a civil proceeding that is available in both State and Federal Court to challenge the legality of imprisonment.In United States law, habeas corpus is a recourse challenging the reasons or conditions of a person's confinement under color of law. By petitioning for a writ, you are asking the court to determine whether your conviction or sentence is illegal. 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. The privilege of the writ of habeas corpus shall not be suspended, unless when in Cases of Rebellion or Invasion the public Safety may require it. The answer for both the North and South was the suspension of the writ of habeas corpus. This petition, called a writ of Habeas Corpus, is filed in Federal Court (U. The Privilege of the Writ of Habeas Corpus shall not be suspended, unless when in Cases of Rebellion or Invasion the public Safety may require it. The privilege of a writ or order of habeas corpus shall not be suspended, unless, in case of rebellion or invasion, the public safety requires it.