The Black Codes, sometimes called Black Laws, were laws governing the conduct of African Americans (free blacks). The best known of them were passed in 1865 and 1866 by , after the American Civil War, in order to restrict African Americans' freedom, and to compel them to work for low wages. However, Black Codes existed before the Civil War, and many Northern states had them. In 1832, "in most of the United States, there is a distinction in respect to political privileges, between free white persons and free coloured persons of African blood; and in no part of the country do the latter, in point of fact, participate equally with the whites, in the exercise of civil and political rights."
The Black Codes, sometimes called Black Laws, were laws governing the conduct of African Americans (free blacks). The best known of them were passed in 1865 and 1866 by , after the American Civil War, in order to restrict African Americans' freedom, and to compel them to work for low wages. However, Black Codes existed before the Civil War, and many Northern states had them. In 1832, "in most of the United States, there is a distinction in respect to political privileges, between free white persons and free coloured persons of African blood; and in no part of the country do the latter, in point of fact, participate equally with the whites, in the exercise of civil and political rights." Black Codes were part of a larger pattern of whites trying to maintain political dominance and suppress the freedmen, newly emancipated African-American slaves. Black codes were essentially replacements for slave codes in those states. Before the war, Northern states that had prohibited slavery also enacted Black Codes: Connecticut, Ohio, Illinois, Indiana, Michigan, and New York enacted laws to discourage free blacks from residing in those states. They were denied equal political rights, including the right to vote, the right to attend public schools, and the right to equal treatment under the law. Some of the Northern states repealed such laws around the same time that the Civil War ended and slavery was abolished by constitutional amendment. Since the colonial period, colonies and states had passed laws that discriminated against free Blacks. In the South, these were generally included in "slave codes"; the goal was to reduce the influence of free blacks (particularly after slave rebellions) because of their potential influence on slaves. Restrictions included prohibiting them from voting (although North Carolina had allowed this before 1831), bearing arms, gathering in groups for worship, and learning to read and write. The purpose of these laws was to preserve slavery in slave societies. In the first two years after the Civil War, white-dominated Southern legislatures passed Black Codes modeled after the earlier slave codes. They were particularly concerned with controlling movement and labor of freedmen, as slavery had been replaced by a free labor system. Although freedmen had been emancipated, their lives were greatly restricted by the Black Codes. The name Black Codes was given by "negro leaders and the Republican organs", according to historian John S. Reynolds. The defining feature of the Black Codes was broad vagrancy law, which allowed local authorities to arrest freedpeople for minor infractions and commit them to involuntary labor. This period was the start of the convict lease system, also described as "slavery by another name" by Douglas Blackmon in his 2008 book on this topic.