The Adventures of Huckleberry Finn reveals the potential that exists in everyone, despite conditions or opportunities, to develop into a well-rounded character. Huck is all too aware of his dysfunctional family with no-one other than a drunken father to look up to and he wishes life could be "better." He struggles to find a real role-model and often wonders, "What would Tom Sawyer do?" The Widow Douglas cares for him due to his father's incapacity but he grows tired of her rules and expectations and longs for excitement. Back with his father, he manages to fake his own death after one of his father's episodes and escape from his father's grasp but has no real idea what he will do next.
Huck tries to emulate what he perceives to be a smarter, more educated Tom who knows so much more about "adventure" and makes everything more "fancy." Tom has quite an influence over Huck, even in his absence and Huck consistently measures himself against what he thinks Tom would do if he were there or what Huck thinks would impress Tom.
When he teams up with Jim, Huck's treatment of him is misguided and a result of society's failings. He thinks of Jim as an ignorant slave over whom Huck, by a God-given right, is superior and his treatment of Jim is sometimes demeaning. However, Huck has already learnt the value of his word and the promise he makes to Jim and intends to "stick to it." Jim is patient with Huck and their relationship, through all their experiences, develops into a friendship. At one point, Huck shows his developing maturity when he feels duty-bound to apologize to Jim after the incident in the fog. The fact that he accepts that he is at fault and also that Jim does deserve an apology, is a large step forward in Huck's growth. Ultimately theses experiences will ensure that Huck does the right thing to save his friend, and "steal him out of slavery," despite the possible consequences and his almost certain damnation.
Huck's development is also significant when he realizes that what the King and Duke are doing is wrong and he wants to put things right by the Wilks' sisters. He is coming to terms with the consequences of his actions and taking responsibility for his own contribution to this scam. Furthermore, when Huck sees the men tarred and feathered, he understands that it is not the right thing to do even though they do deserve to be punished. He feels sorry for "them poor pitiful rascals."
By the end of the book, Huck, then, has changed from a self-serving young boy who has used Jim for his own amusement and who has been guided by a set of morals which are unjust and discriminatory and which he can now see do not serve the greater good. He is a better person.