On June 13, 1866, the 14th Amendment to the U.S. Constitution was passed. This Amendment, known as the one of the three Reconstruction Amendments, granted citizenship to “all persons born or naturalized in the United States.” The 14th Amendment forbid states to deny any person “life, liberty, or property, without due process of law” or to deny any person “equal protection of the laws.”
The amendment was designed to grant citizenship to and protect the civil liberties of people recently freed from slavery.
These liberties were undermined and limited after the Plessy v. Ferguson (1896) Supreme Court case which upheld the constitutionality of segregation and Jim Crow laws and Black codes. See a full copy of 14th Amendment at the National Archives.