A common criticism of Mark Twain’s Huckleberry Finn and Tom Sawyer is that they are full of anti-African-American sentiment because of the use of the “n-word” and the degrading position of slaves.
On the contrary, I would argue that Mark Twain's works are great masterpieces in the emerging American literature of the westward movement of the 1800s. He portrayed human nature with an ironic view, in many of its quirks and foibles. His works reflect the way Southern people were at that time, including the way they talked--and that included the common use of the "n-word."
At that time, the "n-word" did not hold as much insult, hurt, and humiliation as it came to hold later, it seems to me. Mark Twain was very much against treating black people as less than human. We see in Huckleberry Finn that Huck saw the slave Jim as a father figure whom he loved dearly. He was very conflicted over whether he ought to break the law and help Jim escape or obey the law and turn him in. His final decision was the just one, as he realized that the law was wrong. Twain demonstrated through this situation that often the “social right” is, in humane terms, wrong.
When I was a child (lo, these many years ago in the fifties), people said the "n-word" freely, although it was falling out of favor. I was forbidden to say it, even though my grandmother did, and I was not allowed to criticize her for it--conflict!
There was a very old black man who went through our town every day driving his horse-drawn wagon of tools; his name was "N-word" Dink. Everybody thought highly of him, and nobody meant to be disrespectful in calling him that, as far as I in my childish mind knew, although there probably were plenty who did. My mother said I was not to call him "N-word" Dink, but MR. Dink. I thought that was weird, but in my heart, I knew she was right.