The story, told by Jean Louise Finch, takes place during three years (1933–35) of the Great Depression in the fictional town of Maycomb, Alabama, the seat of Maycomb County. Nicknamed Scout, the narrator, who is six years old at the beginning of the book, lives with her older brother Jeremy, nicknamed Jem, and their widowed father Atticus, a middle-aged lawyer. They also have a black cook, Calpurnia, who has been with the family for many years and helps Atticus raise the two children.
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 many of them have not 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. Scout, Jem, and Dill unexpectedly show up, and Scout inadvertently breaks the mob mentality by recognizing and talking to a classmate's father, causing the would-be lynchers to 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, the pastor of Calpurnia's church, invites Jem, Scout and Dill to watch from the colored balcony. Atticus establishes that Mayella Ewell and her father, Bob, are lying. It is revealed that Mayella made sexual advances toward Tom, 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 explains that he destroyed Ewell's last shred of credibility. 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 and is knocked unconscious 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 tells Atticus 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.