As stated in other answers, Huck fakes his death in order to escape his abusive father and also to escape the whole society of St Petersburg which he finds oppressive: indeed, repressive. From the start of the book, we see him trying to adjust to the civilised ways of the Widow Douglas, who has undertaken to adopt him. However, he is nonplussed by social conventions, at having to wear good clothes, talk politely, refrain from smoking, eat and drink genteelly, and so on. Things are made even worse when Miss Watson comes to live with them; she is even more strict than the Widow Douglas. Huck's sufferings are presented comically but underneath it all he feels almost literally suffocated, and at first, when his drunken father returns for him and takes him away, he is just glad to be free from the stifling life at the Widow Douglas's. It is quite conceivable that he would have gone on living with his father as before, on the periphery of society, but when his father starts physically abusing him, it gets too much for him: 'But by and by pap got too handy with his hickory, and I couldn't stand it. I was all over welts.'
It is this maltreatment by his father, his only living relative, that makes Huck finally determine to vanish from society, to get away from people altogether, by escaping to the uninhabited Jackson's island. When he has effected this escape, people assumed he has drowned. In this way, he becomes symbolically dead to the people of St Petersburg. It is only when he is 'dead' to conventional society that he can meet up with the fugitive slave Jim, and embark on a momentous journey down the Mississippi. Freed from the dull respectability of St Petersburg, Huck goes on to have all manner of adventures with a companion who is also outwith the pale of society.
Huck's faked death, then, has the ultimate purpose of freeing him from the restrictions of conventional society to have adventures and new, eye-opening, (if often grim) experiences during his journey down river with Jim.
In addition, after the sale of Huck's money to the Judge, Pap would no longer have an easy avenue to attempt to try to get that money....one less concern for Huck.
I'm assuming you mean in Chapters 6-7 when Huck fakes his own death. Huck does this so he can escape his father and so that no one will search for him. He couldn't stand his father's abuse anymore, plus his father had almost really murdered him in a drunken fit, and Huck did not want anyone, like the Widow, trying to civilize him anymore.