When Huck is spending time with the Grangerfords and learning about their violent, decades-long feud with the Shepherdsons, he joins them at church. His description of this experience contains situational irony:
Next Sunday we all went to church, about three mile, everybody a-horseback. The men took their guns along, so did Buck, and kept them between their knees or stood them handy against the wall. The Shepherdsons done the same. It was pretty ornery preaching—all about brotherly love, and such-like tiresomeness.
This situation is ironic because these two families—whom Huck has learned are out to kill each other—not only go to church together every Sunday but also bring their guns with them while listening to sermons on topics like brotherly love. The tension between what they claim to want (to destroy each other) and what their actions in this scene suggest that they want (to peacefully sit together as “brothers”) highlights the hypocrisy of religion.
While Twain is criticizing the hypocrisy of Christians who feel morally justified in enslaving Black people in the novel, he is also criticizing how Christians can be hypocritical in other aspects of their lives, such as the Grangerfords and Shepherdsons carrying out a violent feud six days of the week and acting peaceful and "brotherly" on Sundays.
After several chapters in which Huck is focused on describing the duke and the king's antics, his attention turns to Jim, whom he witnesses mourning over being separated from his family. Huck's observations contain situational irony:
He was thinking about his wife and his children, away up yonder, and he was low and homesick; because he hadn’t ever been away from home before in his life; and I do believe he cared just as much for his people as white folks does for their’n. It don’t seem natural, but I reckon it’s so.
This is an example of situational irony because Huck expects Jim to be one way (less human than a white person) and he turns out to be the opposite (a person with feelings the same as Huck). Here, Twain uses irony to show how backwards the institution of slavery (as well as the racist logic on which it was built) was, as it was founded on the erroneous idea that one group of human beings was somehow less human than other groups.
What’s more, this moment shows that Huck is maturing from a boy into a young man able to discern what he thinks about himself separate from the racist beliefs he was taught as a white child in pre-Civil War America. It’s likely that witnessing the exploitative and harmful actions of two white men—the king and the duke—he is learning that race is not an indicator of someone’s behavior or morality.
In a strange moment near the end of Huckleberry Finn, Huck reveals to his friend Tom Sawyer that he has been helping Jim escape from slavery and, rather than judge or chastise Huck for it, Tom decides to help him. Instead of appreciating this offer, Huck judges Tom negatively for it, and his narration his internal reaction is an example of situational irony:
I’m bound to say Tom Sawyer fell, considerable, in my estimation. Only I couldn’t believe it. Tom Sawyer a nigger stealer!
This is an example of situational irony because readers would expect Huck to be grateful, but instead, he reinforces racist beliefs by thinking less of Tom for wanting to help Jim (and using the n-word as a racial slur in the process). Though readers have watched Huck grow up over the course of the novel—moving from believing Black people were lesser than white people to being willing to risk his own life to protect Jim—this moment demonstrates that he still has a ways to go to before fully shedding himself of racist attitudes. It’s possible that Twain was trying to make a point that even the most well-meaning white people may not be able to fully rid themselves of racism after so many years of racist conditioning.