Huck's apology to Jim is very significant because with this act, Huck acknowledges an equality between him and Jim; he begins to perceive Jim as fully a human being about whom he has genuine affection.
In Chapter XV Jim and Huck try to reach Cairo, Illinois, where they can connect with the Ohio River so that they get transportation to the free states. But, on the second night, a heavy fog comes up as Huck paddles ahead with the line from the raft. He can find nothing but saplings to tie the raft, and the raft breaks free. Consequently, Jim and Huck become separated as Huck goes downriver on one side of an island, and Jim down the other. As a result, there is no way for them to find each other in the fog.
When Huck does find Jim the next day, Jim is asleep with his one arm over the the steering oar. Huck ties the canoe and lies down under Jim pretending that he was merely asleep and does not know what really happened. Jim is so elated to see Huck that he cries, but after he figures out that Huck is having fun with him, Jim's feelings are really hurt. He scolds Huck,
"....I could a got down on my knees en kiss' yo' foot I's so thankful. En all you wuz thinkin' 'bout wuz how you could make a fool uv ole Jim wid a lie...."
Following Jim's words, Huck feels ashamed of himself. Still he holds the conventional thinking of other Southerners. After a while, however, Huck breaks from this conventional wisdom without regret:
It was fifteen minutes before I could work myself up to go and humble myself to a n****r--but I done it, and I warn't ever sorry for it afterwards, neither. I didn't do him no more mean tricks, and I wouldn't done that one if I'd a knowed it would make him feel that way.
More and more, Huck realizes that Jim is a sensitive human being with genuine affection for Huck. He, too, cares about Jim as he regrets having hurt the man's feelings.