Huck is clearly a proficient liar!
He lies to the Grangerfords, he tells the Wilkes' family he is a British servant, he lies to the watchman about 'his family' on the wrecked Walter Scott, he lies to Aunt Sally and tells her he is Tom Sawyer!
Huck thinks that lies are a way to stay out of trouble and, for the most part, he succeeds! He would rather tell a lie than for the truth to be exposed that he is, in fact, a runaway, and be sent back to the Widow. Huck is enjoying his freedom and will keep it at all costs.
Huck also lies because he really wants to be like Tom Sawyer! He admires Tom's creativity and sense of adventure and tries to be like him as often as he can.
Lastly, Huck lies to save Jim. Half-way through the book, he and Jim have developed a strong bond--father and son, some may say, and Huck will do anything to make sure that Jim is okay and that they both are able to retain their newfound freedom.
There are many instances where Huck lies in order to find out information or to prevent discovery. He disguises himself as a girl named "Sarah Mary Williams" in order to steal supplies and gain information, and in doing so finds out that they believe Huck was murdered by either his father or by Jim. He lies to the people on the river who are looking for runaways and tells them that his family is on the raft and are sick so they'll stay away, and thereby prevents them from discovering Jim on the raft. He also lies to the Grangerfords and tells them a story and a fake name, in order to protect himself and Jim.
Ultimately, Huck lies in order protect Jim, time and time again. Whereas some other characters like the Duke and King lie for personal gain, Huck's lies stem mostly from his desire to help his friend. Huck's friendship with Jim is a driving force in the book, and he decides that he would rather go to hell than to turn Jim in. So, he figures, he "might as well go whole hog," or in other words, if he's going to hell, he might as well really go for it. A couple lies on top of it all doesn't matter because he's already going to hell.