The irony of understanding Huck’s moral code throughout the book is that Huck always had the same morals, he just didn’t know it until he had to make a big decision about turning in Jim as a runaway slave. This is part of Huck’s growing up and realizing what he believes when it comes to people and the institution of slavery. Throughout the novel, Huck is influenced by the values, beliefs, and laws of society. He feels he is breaking the law by not turning over Jim to the slave hunters he meets on shore one night. He lies to the slave hunters and feels guilty for not doing what the law, the Fugitive Slave Act of the time, required. He can’t make himself turn in Jim because of his growing love for Jim. Jim and Huck are becoming a family, and Jim represents a father figure to Huck who also guides Huck’s moral compass. As readers, we realize that Huck is doing the right thing (called dramatic irony) by not turning Jim in, but Huck is influenced by what society says he should do. It is not until the end of the King and Duke episode that Huck makes his final moral decision. He decides to write a letter to the Widow Douglas stating that he is with Jim on the Mississippi. After much thought, he tears up the letter and claims that “he will go to hell” for not sending it. It is here, again, that Huck feels he is doing wrong, but the decision to risk going to hell does not outweigh doing the right thing for Jim.
We see these moral struggles throughout the novel in scenes where Huck must decide whether to help Jim find the Ohio River to go north, whether to expose the King and Duke as con artists, and whether to go along with Tom’s crazy antics at the Phelps’ farm.
Deep down inside, Huck always knows the right thing to do, but as a young 13 year old, he struggles with whether to follow and believe in the values of society at the time. At the end of the book, he realizes that he can’t live in the society by following their rules, and “lights out” to the western territories where he feels he will be able to live life as an individual on his own terms.