Black codes were restrictive laws designed to limit the freedom of African Americans and ensure their availability as a cheap labor force after slavery was abolished during the Civil War.
the slave codes set very strict rules to making sure the slaves could not get free and if they could, slave catchers could catch them and return them to their owner, who could kill them, make their work load harder, or beat them