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.
The Supreme Court decided that the suspension of habeas corpus was unconstitutional because civilian courts were still operating, and the Constitution of the United States (according to the Court) only provided for suspension of habeas corpus if these courts are actually forced closed. In essence, the court ruled that military tribunals could not try civilians in areas where civil courts were open, even during wartime.
See also:
The Case
The Decision