The story, told by the six-year-old Jean Louise Finch, takes place during three years (1933–35) of the Great Depression in the fictional "tired old town" of Maycomb, Alabama, the seat of Maycomb County. Jean Louise Finch, nicknamed Scout, lives with her older brother Jeremy, nicknamed 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 each summer. The three children are terrified, yet fascinated by their neighbor, the reclusive Arthur "Boo" Radley. The adults of Maycomb are hesitant to talk about Boo, and few of them have seen him for many years. The children feed one another's imagination with rumors about his appearance and reasons for remaining hidden, and they fantasize about how to get him out of his house. After 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, he never appears in person.
Judge Taylor appoints Atticus to defend Tom Robinson, a black man who has been accused of raping a young white woman, Mayella Ewell. 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's actions, calling him a "nigger-lover". Scout is tempted to stand up for her father's honor by fighting, even though he has told her not to. One night, Atticus faces a group of men intent on lynching Tom. This crisis is averted in an unexpected manner: Scout, Jem, and Dill show up, and Scout inadvertently breaks the mob mentality by recognizing and talking to a classmate's father, and the would-be lynchers disperse.
Atticus does not want Jem and Scout to be present at Tom Robinson's trial. No seat is available on the main floor, but the Rev. Sykes invites Jem, Scout, and Dill to watch from the colored balcony. Atticus establishes that Mayella and Bob Ewell are lying. It is revealed that Mayella made sexual advances toward Tom, subsequently resulting in her being beaten by her father. The townspeople refer to the Ewells as "white trash" who are not to be trusted, but the jury convicts Tom regardless. Jem's faith in justice is badly shaken. Atticus is hopeful that he can get the verdict overturned, but Tom is shot and killed while trying to escape from prison.
Despite Tom's conviction, Bob Ewell is humiliated by the events of the trial, Atticus explaining that he "destroyed [Ewell's] last shred of credibility at that trial." Ewell vows revenge, spitting in Atticus' face, trying to break into the judge's house and menacing Tom Robinson's widow. Finally, he attacks Jem and Scout while they are walking home on a dark night after the school Halloween pageant. Jem suffers a broken arm 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 Boo Radley.
Sheriff Tate arrives and discovers Ewell dead from a knife wound. Atticus believes that Jem was responsible, but Tate is certain it was Boo. The sheriff decides that, to protect Boo's privacy, he will report that Ewell simply fell on his own knife during the attack. Boo asks Scout to walk him home. After she says goodbye to him at his front door, he disappears, never to be seen again by Scout. While standing on the Radley porch, Scout imagines life from Boo's perspective.