The story takes place during three years of the Great Depression in the fictional "tired old town" of Maycomb, Alabama. The narrator, six-year-old Scout Finch, lives with her older brother Jem and their widowed father Atticus, a middle-aged lawyer. Jem and Scout befriend a boy named Dill who visits Maycomb to stay with his aunt for the summer. The three children are terrified by, and fascinated with, their neighbor, the reclusive "Boo" Radley. The adults of Maycomb are hesitant to talk about Boo and for many years, few have seen him. The children feed each other's imaginations with rumors about his appearance and reasons for remaining hidden, and they fantasize about how to get him out of his house. Following two summers of friendship with Dill, Scout and Jem find that someone is leaving them small gifts in a tree outside the Radley place. Several times, the mysterious Boo makes gestures of affection to the children, but, to their disappointment, never appears in person.
Atticus is assigned to defend a black man named Tom Robinson, who has been accused of raping Mayella Ewell, a young white woman. Although many of Maycomb's citizens disapprove, Atticus agrees to defend Tom to the best of his ability. Other children taunt Jem and Scout for Atticus' actions. Scout is tempted to stand up for her father's honor by fighting, even though he has told her not to. For his part, Atticus faces a group of men intent on lynching Tom. This danger is averted when Scout, Jem, and Dill shame the mob into dispersing by forcing them to view the situation from Atticus's and Tom's points of view.
Because Atticus does not want them to be present at Tom Robinson's trial, Scout, Jem, and Dill watch in secret from the colored balcony. Atticus establishes that the accusers—Mayella and her father, Bob Ewell, the town drunk—are lying. It also becomes clear that the friendless Mayella was making sexual advances towards Tom and her father caught her in the act. Despite significant evidence of Tom's innocence, the jury convicts him. Jem's faith in justice is badly shaken, as is Atticus', when a hopeless Tom is shot and killed while trying to escape from prison.
Humiliated by the trial, Bob Ewell vows revenge. He spits in Atticus' face on the street, tries to break into the presiding judge's house, and menaces Tom Robinson's widow. Finally, he attacks the defenseless Jem and Scout as they walk home from the school Halloween pageant. Jem's arm is broken in the struggle, but amid the confusion, someone comes to the children's rescue. The mysterious man carries Jem home, where Scout realizes that he is the reclusive Boo Radley.
Maycomb's sheriff arrives and discovers that Bob Ewell has been killed in the struggle. The sheriff argues with Atticus about the prudence and ethics of holding Jem or Boo responsible. Atticus eventually accepts the sheriff's story that Ewell simply fell on his own knife. Boo asks Scout to walk him home, and after she says goodbye to him at his front door, he disappears again. While standing on the Radley porch, Scout imagines life from Boo's perspective and regrets that they never repaid him for the gifts he had given them.