Black Codes in the United States, legal statutes that curtailed the rights of African Americans during the early years of Reconstruction in the United States.

Similar in both character and content to the Slave Codes, Black Codes were instituted by Southern legislative bodies in 1865 and 1866 in order to eviscerate civil rights legislation of the Reconstruction and reestablish control over the four million newly emancipated African Americans. Just as the Slave Codes denied African Americans any legal status besides that of property, Black Codes defined the freedpeople as legally subordinate to whites.

Faced with a rapidly transformed political and economic structure in the postbellum South, states such as Mississippi and South Carolina began passing laws in 1865 to limit the freedom of African Americans in many ways. Laws were instituted forcing black men and women to work or face imprisonment . Often the result was that freed men and women returned to work for their former slave owners or on nearby plantations. The termination of a contract was made illegal for "any freedman, free Negro or mulatto" with the consequence, again, of imprisonment or hard labor.

In order to restrict the movement and resettlement of ex-slaves, laws forbade blacks to own or rent farmland. Ironically, African Americans were given the new status of being allowed some legal responsibility; this had been absent during slavery. The right to marry each other, sue each other, and own minimal property were written in the Codes. The purpose of the Black Codes, however, was the maintenance of a white-dominated hierarchy after the Civil War.

In 1865, Alabama and Louisiana joined Mississippi and South Carolina in the creation of laws that were, in spirit, attempts to re-enslave African Americans. By 1866 all the states of the former Confederacy, except North Carolina, enacted laws which echoed the Slave Codes. These southern states passed laws which permitted the imprisonment or hiring out of vagrants, with vagrancy defined as black persons who were unemployed or possessed no contract with a white employer. Further, children who were orphans, or whose parents were impoverished, were turned over to the state and forced into apprenticeships with white private businessmen. Statutes requiring African American skilled laborers and artisans to pay exorbitant licensing fees made it rare for freedpeople to be anything besides wage laborers. Due to outrage over this virtual re-enslavement, northern journalists in such newspapers as the New York Times and the Chicago Tribune printed protests.

An important aspect of the Black Codes was their unequal system of punishment. The codes sanctioned the whipping of black workers by white employers, and a minor offense such as stealing food could bring physical brutality and forced servitude. Blacks found "unlawfully assembling themselves together either in the day or nighttime" would be subject to immediate imprisonment. Whites could rarely be held culpable for any "crime" which they committed against an African American. Thus, intimidation and attacks upon the freedpeople by white individuals and groups such as the Ku Klux Klan were commonplace and blacks had no form of legal redress for their mistreatment.