In the scene in which Tom and Huck are in the graveyard (just before they witness Injun Joe kill Dr. Robinson), Twain uses personification to heighten their frightening environment:
A faint wind moaned through the trees, and Tom feared it might be the spirits of the dead, complaining of being disturbed. The boys talked little, and only under their breath, for the time and the place and the pervading solemnity and silence oppressed their spirits.
“Faint wind moaned” and “silence oppressed their spirits” are two phrases that give non-human entities human abilities (moaning and oppressing, respectively). While Twain could have described the scene more literally, these personifications add to the tension building in the scene. Readers can intuit that something spooky or unsettling is going to happen, right as the boys prepare to witness a devastating murder.
This quote also nods to how, even though Tom and Huck are used to fantasizing about being heroes and showing off their bravery, their imaginations can also lead them to feeling childlike and afraid. For example, Tom imagining that the spirits of the dead are responsible for the moaning sounds of the wind demonstrates how his imagination can sometimes get the better of him.
Near the end of the novel, Twain uses personification to communicate Huck’s distaste for wealth and being forced into respectable society:
Huck Finn’s wealth and the fact that he was now under the Widow Douglas’s protection introduced him into society—no, dragged him into it, hurled him into it—and his sufferings were almost more than he could bear. The widow’s servants kept him clean and neat, combed and brushed, and they bedded him nightly in unsympathetic sheets that had not one little spot or stain which he could press to his heart and know for a friend.
Huck’s wealth “dragged” and “hurled” him into society, and his fancy sheets felt “unsympathetic”—all human qualities that Twain invokes in order to show how powerless and oppressed Huck feels now that he is being forced to integrate into society.
Huck’s overall presence in the novel highlights how wealth is not always as freeing as some people make it out to be. When choosing between respectable adult society and the challenges of freedom, Huck chooses freedom. This is because, as someone who has been an outcast for most of his life, he sees the hypocrisy of their society. He sees how the villagers who claim to be moral go from shunning and avoiding him to celebrating and embracing him all because he happened to find treasure. Twain ultimately has Huck reject his wealth (and society as a whole) in order remind readers that becoming “respectable” is not always all it’s cracked up to be.