This procedure, part of English common law, was considered important enough to be specifically mentioned in the U.S. Constitution, which states that "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." Habeas corpus was suspended at the beginning of the American Civil War by President Lincoln. His action was challenged in court, and upheld.
The most common American use of habeas corpus today is as part of the appeals process after conviction. Decisions by the Rehnquist? Supreme Court have limited its use, especially in capital cases.
Habeas corpus was suspended during American Civil War by Abraham Lincoln in parts of midwestern states, including southern Indiana. He did so in response to demands by Generals to set up military courts to rein in "Copperheads", or those in the Union who supported the Confederate cause. Lambdin Milligan and four others were accused of planning to steal Union weapons and invade Union prisoner-of-war camps and were sentenced to hang by a military court in 1864. However, their execution was not set until May 1865, so they were able to argue the case after the Civil War. It was decided in the Supreme Court case Ex parte Milligan that the suspension was unconstitutional because civilian courts were still operating and the Constitution (according to the Court) only provided for suspension of Habeas Corpus if these courts are actually forced closed.