The novel can be seen as an exploration of the divide between a morality of the majority and the morality of the individual. Huck Finn faces moral conflicts repeatedly that can be stated in exactly these terms.
Huck is divided about what "the right thing " to do is when Jim presents him with a story of escape, when he is tempted to betray the King and the Duke, and when he witnesses the hardships of the Grangerford and Wilks families.
There are almost always two paths for Huck to take, one which represents conventional social mores and another which represents an independent morality based on the circumstances and relationships Huck finds himself engaged with. The "right choice" is almost always the one that leads him to follow his individual, native sense of morality.
Twain uses the Sherburn episode to articulate a particularly negative view of "the morality of the majority".
Twain speaks out against lynch mobs who do not fight with courage but come like cowards in the middle of the night wearing masks.
The speech Sherburn gives relates to courage and cowardice as they are codified and practiced in the culture of the day. Juries are derided and lynch mobs are ridiculed. Morality, in the hands of the mob, is the rule of weak impulses over strong, of fear over courage.
When viewed in light of Sherburn's speech, Huck Finn's decisions to choose his own moral path becomes associated with courage, independence and, as Sherburn sees it, manhood.
Sherburn's address concerns a "morality of the masses" or the impossibility of a true morality generated by a large group. As Sherburn directly attacks the moral strength of the mob he condemns the notion of abdicating moral responsibility by joining the crowd.
The men in the crowd give up their individual moral responsibility when they come to lynch Sherburn and Sherburn forces them to recognize this fact. He "re-individuates" the crowd by making them reflect on what they are doing. He refuses to apologize for what he has done just as he refuses to allow this mob to divorce itself from moral obligation.
Colonel Sherburn’s speech to the would-be lynch mob is a harsh invective against mob action of any kind.
Proving that the assembly is defined by cowardice and weakness, Sherburn turns them away with a mere speech. His shotgun stands almost as a prop while he decries the weakness of the group, the weakness of their culture (in regards to acting as individuals), and enumerates various instances that symbolize these weaknesses.
Twain here expresses a parallel point to Huck's general effort to develop enough bravery in himself to think on his own, come to his own conclusions, and trust his moral instincts over those of society in the abstract.
Colonel Sherburn addressed the mob that stormed his front yard, demanding that he be lynched as justice in the aftermath of his shooting of Boggs. Sherburn left no doubt regarding how he felt about the people present and the plans they proposed to carry out.
The idea of you lynching anybody!...if only half a man - like Buck Harkness, there - shouts 'Lynch him, lynch him!' you're afraid to back down-afraid you'll be found out to be what you are - cowards...
Twain, through Colonel Sherburn, is commenting on the false bravery of insecure and/or cowardly individuals who become brave when they are supported by large numbers of people with similar ideas, pointing out that there is a huge difference between making big threats with a group and actually carrying out the threatened actions. He's commenting on human nature - the ease with which little people fool themselves into thinking they're bigger and braver and more important than they actually are or can be..