The answer to this question can be found in Chapter 13 of this great novel, and also gives us a key insight into Huck's character. Once he and Jim have escaped the murderers, Huck finds that his thoughts dwell on the fate of the men and the way that they are stuck on a ship that is sinking. Note what he thinks to himself:
Now was the first time that I begun to worry about the men--I reckon I hadn't had time to before. I begun to think how dreadful it was, even for murderes, to be in such a fix. I says to myself, there ain't no telling but I might come to be a murderer myself yet, and then how would I like it?
Thus we can see that Huck decides to save the murderers because he is obviously a sympathetic and compassionate boy, and he also wants to treat the murderers with kindness because he might one day need to be a murderer himself, and he would like to think that others would treat him kindly. Huck reveals himself to be a good boy whose natural sympathy leads him to try to save the murderers in spite of their bad deeds.