One of the traits of humans that Mark Twain enjoys satirizing in The Adventures of Huckleberry Finn is hypocrisy, and the religious hypocrisy of Miss Watson and the Widow Douglas, who owns slaves. Others, too, practice Christian virtues, but ignore the sin of exploitation of other beings in the practice of slavery.
In Chapter I, the Widow and Miss Watson read to Huck from the Bible, but then they call him "lots of other names...but never meant no harm." Huck finds the "pecking" at him tiresome. Then, in the evening, "they fetched the niggers [at the time of Twain's writing, this word was colloquial for "slaves"] in and had prayers."
In Chapter XV, Huck cannot resist exploring a shipwrecked steamboat, but then he discovers that there are murderers on board. But, after he leaves he feels guilty when he and Jim take their skiff because the raft has broken free. So, he tells a steamboat captain a fabricated story so that this captain will search around the shipwreck. He wishes the widow could know about his Christian charity:
I judged she would be proud of me for helping these rapscallions because rapscallions and dead beats is the kind the widow and good people takes the most interest in.
(Yet, the Widow owns slaves)
In Chapter XVI, despite Huck's harboring a slave and his pilfering, he wrestles with his conscience about his having deceived Jim, making him believe that he had only dreamed that Huck was missing, and having caused Jim agony as he thought that Huck was dead and cried. Finally, his conscience bothers him and he confesses that he has played a trick and apologizes to Jim. Yet, he still has moral confusion because society tells him to be virtuous, but it is all right to have slavery.
In Chapter XXXI, Huck and Jim have grown to love each other in a relationship of friendship and father/son. With such amity between them, Huck cannot bring himself to write the Widow Douglas in order to inform her that her runaway slave is on the Phelps' property. Yet, despite his lessons in virtue, he feels that he doing wrong in helping Jim run to freedom.
And then think of ME! It would get all around that Huck Finn helped a nigger to get his freedom; and if I was ever to see anybody from that town again I'd be ready to get down and lick his boots for shame. That's just the way: a person does a low-down thing, and then he don't want to take no consequences of it.
Huck's moral confusion derives from the mistaken notion that slavery is acceptable. However, his innate sense of right and wrong takes precedence and he rebelliously decides, "All right, then, I'll go to hell" and he tears up the note informing the Widow of Jim's whereabouts. deciding to "take up wickedness again."