Huck is clever and honest, and has a conscience. These characteristics help him be successful in surviving his difficult journey, and getting out of trouble when he gets into it.
For example, when his father is holding him hostage, he finds a way to fake his own death. He uses his cleverness to get away.
Huck is also honest, and a good friend. He does not want to take part in the destructive behavior of the king and duke and warns Mary Jane and makes arrangements so that she does not get into further trouble.
Huck also does not conform to the wishes of his society. He follows his conscience. Huck befriends Jim, and learns to trust him and treat him as a person and not a slave. Befriending Jim was key to his survival, both because he had a friend and because they worked together to stay alive.