Black Codes is the popular name given to the statutes passed by Southern slave states, before and immediately after the American Civil War (1861-1865), although the term is now used primarily to refer to those statutes passed in the brief intervening period after the war during which the Southern states were able to attempt to assert some kind of continued prejudice against "blacks".
The term black code is borrowed from the French term "code noir", a name given to a statute enacted at the direction of the French King Louis XIV in 1685, which prohibited Jews from moving to French colonies, and controlling many features of slavery then rampant in French colonies (of which Illinois became a part from the initial expoloration of the Illinois River in 1682 until 1763).
Before the US Civil War, Southern states published their black codes with impunity. But after the war, their renewed interest in amending their black codes, this time to limit the civil rights of slaves the civil war had freed, quickly attracted the attention of the federal government, resulting in the rapid repeal of each all of the black codes, especially with the ratification of the Fourteenth Amendment in 1868.
The pre-Civil War black codes of Indiana and Illinois prohibited any "negro" person from moving to those states. Other black codes prohibited inter-racial marriages.
After the Civil War, all former slaves states enacted black codes.
Mississippi's black code was passed in Jackson, Mississippi in December of 1866.
An ominous extract: "... it shall not be lawful for any freedman, free Negro, or mulatto to intermarry with any white person".
Then, the Mississippi black code really got creative, trying to slip the racial stipulation right after a generic vagrancy provision:
"(A)ll rogues and vagabonds, idle and dissipated persons, beggars, jugglers, or persons practicing unlawful games or plays, runaways, common drunkards, common night-walkers, pilferers, lewd, wanton, or lascivious persons, in speech or behavior, common railers and brawlers, persons who neglect their calling or employment, misspend what they earn, or do not provide for the support of themselves or their families, or dependents, and all other idle and disorderly persons, including all who neglect all lawful business, habitually misspend their time by frequenting houses of ill-fame, gaming-houses, or tippling shops, shall be deemed and considered vagrants, under the provisions of this act, and upon conviction thereof shall be fined not exceeding $100, with all accruing costs, and be imprisoned at the discretion of the court, not exceeding 10 days.
"All freedmen, free negroes and mulattoes in this State, over the age of eighteen years, found on the second Monday in January, 1866, or thereafter, with no lawful employment or business, or found unlawfully assembling themselves together, either in the day or night time, and all white persons so assembling themselves with freedmen, free negroes or mulattoes, or usually associating with freedmen, free negroes or mulattoes, on terms of equality, or living in adultery or fornication with a freed woman, free negro or mulatto, shall be deemed vagrants, and on conviction thereof shall be fined in a sum not exceeding, in the case of a freedman, free negro or mulatto, $50, and a white man $200, and imprisoned at the discretion of the court, the free negro not exceeding 10 days, and the white man not exceeding six months."
Other black codes prohibited in owners from offering accommodation to Negro and mulatto guests; this, to hinder slave escapes.
The Ohio black code prohibited any "black or mulatto person" from settling in Ohio without a judicial certificate as to his freedom. Further, all such persons were to:
"... enter his or her name, together with the name or names of his or her children, in the clerk's office in the county in which he, she or they reside, which shall be entered on record by said clerk, and thereafter the clerk's certificate of such record shall be sufficient evidence of his, her or their freedom; and for every entry and certificate, the person obtaining the same shall pay to the clerk twelve and an half cents."
The US Congress' answer to the black codes was to propose a Fourteenth Amendment to the US Constitution, which passed in 1868.