The decision in Dred Scott v. Sandford of 1857 was a dismissal, on technical grounds, of the plaintiff's right to sue for his freedom. The Supreme Court found that African-Americans were not citizens of the United States, and therefore they had no right to appeal to the courts for injunctive relief.
What became known as the Dred Scott case began when Scott, a slave, sued his late master's heirs for his freedom. His case hinged on a trip he and his master had taken years earlier to Illinois, which was a free state, which Scott contended rendered him free on crossing the state line. He argued that having been freed by default, he voluntarily returned to Missouri with his master but that he had no further interest in serving after his former owner's death.
The case worked its way up to the Supreme Court, which declined to rule on the grounds that Scott, as a black man, had no rights the law was obliged to respect and that simply crossing into a free state did not confer freedom. Further, the Court ruled that Congress lacked the authority to bar slavery from territories, thus overturning the 1830 Missouri Compromise. The decision was largely disregarded during and immediately after the Civil War and was ultimately overturned by the 13th and 14th Amendments.