Huck's greatest conflict throughout the novel is an internal one; his dilemma over what to do about Jim, the fugitive slave. The laws of society demand that he turn Jim over to his owner, Miss Watson; but his own instinct is to allow Jim to go free. The whole novel revolves around this moral conflict within Huck.
Although he has grown up on the periphery of society, Huck is still not immune to its conventions. Everything he has been taught points to Jim being the wrongdoer in running away from his owner, whereas it is actually society in the wrong for maintaining the system of slavery in the first place.
The journey down the Mississippi allows Huck and Jim to flee from the constraints of civilization and into the realm of nature but Huck still cannot escape the conscience falsely implanted in him by St Petersburg society. In the end, though, he chooses to listen to the promptings of his real conscience, the natural goodness and humanity of his own heart. He decides not to give Jim up after all, when he remembers what a stalwart friend Jim has always been to him. He is about to send a written message to Miss Watson letting her know where Jim is, when he gets to thinking of the whole trip down river:
I see Jim before me all the time: in the day and in the night-time, sometimes moonlight, sometimes storms, and we a-floating along, talking and singing and laughing. But somehow I couldn't seem to strike no places to harden me against him, but only the other kind. I'd see him standing my watch on top of his'n, 'stead of calling me, so I could go on sleeping; and see him how glad he was when I come back out of the fog; and when I come to him again in the swamp, up there where the feud was; and such-like times; and would always call me honey, and pet me and do everything he could think of for me, and how good he always was..(Chapter 31)
After this, Huck tears up the paper, even though he thinks this will send him to ‘hell’ (Chapter 31). And he determines never to think about turning Jim in again, and that he will go on being just as bad as he can. The irony is complete: he is actually being very good, but due to the false teachings of society he is not able to understand this.
Huck can be acclaimed a hero in his refusal to give Jim up, as this goes entirely against society and all he has been taught, and he has no-one but himself to rely on. He chooses to behave according to his own individual lights, even although this leaves him worried and confused; he proves to be a true loyal friend to Jim.