Huck's makes his decision not to turn Jim in based on his conscience. Following the law or doing the right thing has become a real moral dilemma for Huck. He believes that in helping Jim he's breaking the law. On the other hand, turning Jim in would be a betrayal of their friendship. In the end, the friendship wins out.
The Adventures of Huckleberry Finn