In the case Sanford v. Dred Scott the US Supreme Court ruled that African Americans who were slaves or that had ancestors that were slaves were not entitled to the rights of a federal citizen and could not be in court.
Because of that, Dred Scott did not have the legal right to request his freedom in the justice system.
This decision helped to push tension further which later erupted the American Civil War.