Tom Sawyer's main conflict is his conflict between his self-interests and what is the right thing to do.
In his afterword to The Adventures of Tom Sawyer, a novel about a young boy who "overflows" with the exuberance of life, ignorance of responsibility, and mischievousness, Geoffrey Sanborn writes that Mark Twain composed a tribute to "the free, unscarred, unsmitten nature" of childhood. In fact, Sanborn points out, Twain himself admitted that he was captivated by youthful pleasures. Sanborn states that when he published his book, Twain wrote in his epilogue that his novel was "strictly the history of a boy."
Tom's boyish adventures are delightful. He is mischievous and plays tricks on the other children; for instance, he fools the neighborhood boys into whitewashing the fence for him, and he trades for tickets while at Sunday school so that he can have enough to win a Bible, whose verses he does not even know. However, as the narrative progresses, Tom's adventures become less frivolous. In Chapter 10, for example, after Tom and Huck Finn witness the murder of Dr. Robinson by Injun Joe, they vow to be silent. Unaware that Injun Joe plans for Muff Potter to be blamed for his crime since Potter's knife is in the body of the doctor, Tom and Huck make a blood oath not to reveal what they saw out of fear for their own lives. But, when Tom learns that Potter is arrested for the murder of Dr. Robinson, his conscience torments him for not having reported the truth about the murder. It is at this point that Tom faces a conflict of his own selfish interests against what is right. Because of this guilt, Tom sneaks off to Potter's jail cell in order to bring the man small gifts.
In Chapter 13 Tom joins Huck and Joe Harper on a raft, and they pole their way to Jackson's Island. After trading tales and eating, the boys lie down to sleep.
Then at once they reached and hovered upon the imminent verge of sleep--but an intruder came, now, that would not "down." It was conscience. They began to feel a vague fear that they had been doing wrong to run away; and next they thought of the stolen meat, and then the real torture came. They tried to argue it away by reminding conscience that they had purloined sweetmeats and apples scores of times, but conscience was not to be appeased by such thin possibilities. (Ch.13)
As a consequence of this "intruder," the boys resolve that “their piracy should not again be sullied with the crime of stealing.” It is at this point, therefore, that Tom starts to develop his moral conscience and begins to mature. Nevertheless, Joe, Tom, and Huck do not return as they should. So, when their raft is found, the townspeople naturally assume that the boys have died. After learning what has occurred, Tom convinces the other boys to all appear at their funeral. When they do so, they are met with much rejoicing, and the boys delight in the attention. Later, at the trial of Muff Potter, Tom testifies that he witnessed Injun Joe commit the murder of Dr. Robinson. This testimony demonstrates Tom Sawyer's maturation as he has done the right thing.