The North Carolina General Assembly first prohibited anyone from teaching slaves to read or write in 1818, then strengthened the law in 1830 (in the bill reprinted here).
The following year, another bill made it illegal for not only slaves but free people of color “to preach or exhort in public, or in any manner to officiate as a preacher or teacher in any prayer meeting or other association for worship where slaves of different families are collected together.”
Whereas the teaching of slaves to read and write has a tendency to excite dissatisfaction in their minds and to produce insurrection and rebellion to the manifest injury of the citizens of this state: Therefore
Be it enacted by the General Asembly of the State of North Carolina, and it is hereby enacted by the authority of the same, that any free person who shall hereafter teach or attempt to teach any slave within this State to read or write, the use of figures excepted, Shall be liable to indictment in any court of record in the State having jurisdiction thereof, and upon conviction shall at the discretion of the court if a During the colonial period, both whites and blacks were punished with corporal punishments such as whipping. Historian Kirsten Fischer has shown that during the late eighteenth and early nineteenth century, there was a division in the type of punishments levied against blacks and whites. It became less and less common for whites to be physically punished by whipping and branding, but these corporeal punishments continued to be used by the State against blacks -- free and enslaved. She convincingly argues that this division in the judicial system was part of a new social and political system that divided blacks and whites, especially poor whites and free people of color.
Be it further enacted that if any slave shall hereafter teach or attempt to teach any other slave to read or write the use of figures excepted, he or she may be carried before any justice of the peace and on conviction thereof shall be sentenced to receive thirty nine lashes on his or her bare back.