It is illegal in this pre-Civil War society to help a slave escape. A slave was a piece of property, so helping a slave get free is similar to helping to steal a car today—if you find someone stealing a car, you are supposed to help return it to the rightful owner. Otherwise, you are aiding and abetting a crime. Most people in our society would expect you to side with the owner of the car, not the person taking it.
Huck knows that legally and in the eyes of his society, he is wrong to help a slave like Jim escape. He also expects God to punish him by sending him to hell. Nevertheless, in Huck's heart and mind he knows Jim is not a "thing" but a fully human being. Huck remembers all the kindness Jim has shown him. He recognizes they have a strong friendship. He can't deny Jim's decency and humanity. As his moral compass develops, Huck realizes that, no matter what the punishment, he can't betray Jim.
(The entire section contains 2 answers and 511 words.)