Black Codes were laws passed in the United States in order to limit freedoms, such as voting and literacy, of African-Americans. Black Codes were largely enacted in southern states, however several northern states had them as well to deter African-Americans from residing in them.
Wikipedia
Black Codes
Video
Black Codes and Pig Laws (PBS)
Further Reading
Black Codes (History.com)
Black Codes (Encyclopedia.com)
The Black Codes and Why They Matter Today (ThoughtCo.)
Black Codes (Khan Academy)