The Black Codes were laws passed on the state and local level in the United States to limit the civil rights and civil liberties of African Americans. Even though the United States constitution originally discriminated against African Americans (as "other persons") and both northern and southern states had passed discriminatory legislation since the early 19th century, the term Black Codes is used most often to refer to legislation passed by Southern states at the end of the Civil War to control the labor, movements and activities of newly freed slaves.
In Texas the Eleventh Legislature produced these codes in 1866. The intent of the legislation was to reaffirm the inferior position that slaves and free blacks had held in antebellum Texas and to regulate black labor. The codes reflected the unwillingness of white Texans to accept blacks as equals and also their fears that freedmen would not work unless coerced. Thus the codes continued legal discrimination between whites and blacks. The legislature, when it amended the 1856 penal code, emphasized the continuing line between whites and blacks by defining all individuals with one-eighth or more African blood as persons of color, subject to special provisions in the law.
The black codes enacted immediately after the American Civil War, though varying from state to state, were all intended to secure a steady supply of cheap labor, and all continued to assume the inferiority of the freed slaves. The black codes had their roots in the slave codes that had formerly been in effect. The premise behind chattel slavery in America was that slaves were property, and, as such, they had few or no legal rights. The slave codes, in their many loosely defined forms, were seen as effective tools against slave unrest, particularly as a hedge against uprisings and runaways. Enforcement of slave codes also varied, but corporal punishment was widely and harshly employed.