Black Codes and Pig Laws
Immediately after the Civil War ended, Southern states enacted "black codes" that allowed African Americans certain rights, such as legalized marriage, ownership of property, and limited access to the courts, but denied them the rights to testify against whites, to serve on juries or in state militias, vote, or start a job without the approval of the previous employer. These codes were all repealed in 1866 when Reconstruction began.
But after the failure of Reconstruction in 1877, and the removal of black men from political offices, Southern states again enacted a series of laws intended to circumscribe the lives of African Americans. Harsh contract laws penalized anyone attempting to leave a job before an advance had been worked off. “Pig Laws” unfairly penalized poor African Americans for crimes such as stealing a farm animal. And vagrancy statutes made it a crime to be unemployed. Many misdemeanors or trivial offenses were treated as felonies, with harsh sentences and fines.
The Pig Laws stayed on the books for decades, and were expanded with even more discriminatory laws once the Jim Crow era began.