Black code, in U.S. history, any of numerous laws enacted in the states of the former Confederacy after the Civil War and intended to assure the continuance of white supremacy. Enacted in 1865 and 1866, the laws had their roots in the slave codes that had formerly been in effect. Read more about the black codes here.