Jim Crow laws.
Step-by-step explanation:
After the Civil War, segregation in the South was still very prevalent. Jim Crow laws were all over the South and were made to keep African-Americans and white people separate. Some of these laws included things like separate schooling for white and black children, different prisons, separate ticket booths, etc.
Black codes were also a very common thing in the South. These were much more harsher than Jim Crow laws and made it very hard for African-Americans to do anything in everyday life. Many would get arrested for no real reason. Voting laws were also very common as well, so many African-Americans could not vote.
Years and years of protesting these unequal doings, Jim Crow laws, along with other segregative laws and measures, became illegal.