I was listening to an audiobook of James Fenimore Cooper's early novel The Spy (which is set in the Revolutionary period), and I was quite surprised to hear this exchange in so early a novel:
For a moment the pedler hesitated ; his eye glanced towards Harper, who was yet gazing at him with settled meaning, and the whole manner of Birch was altered. Approaching the fire, he took from his mouth a large allowance of the Virginian weed, and depositing it, with the superabundance of its juices, without mercy to Miss Peyton's shining andirons, returned to his goods, and replied in a more lively tone--"He lives somewhere among the niggars to the south."Cooper is clearly both showing that the house slave Caesar has taken offense at the term, and both whites involved recognize that the term is considered offensive. I confess that I was somewhat surprised to see the term recognized as such in a novel published as early as 1823.
"No more niggar than be yourself, Mister Birch," interrupted Caesar tartly, and dropping the covering of the goods in high displeasure.
"Hush, Caesar — hush — never mind it now," said Sarah Wharton soothingly, waiting with impatience to hear further. "
A black man so good as white, Miss Sally," continued the offended African, " so long he behave heself." "
And frequently much better," rejoined his mistress : "but, Harvey, who is this Mr. Sumpter?"