Matthew and Marilla Cuthbert are unmarried siblings who live on their ancestral farm, Green Gables, in the quiet town of Avonlea in Prince Edward Island, Canada. Matthew is sixty, and since he is getting too old to handle the farm work on his own, the Cuthberts decide to adopt an orphan boy to help him. This decision shocks the town gossip, Mrs. Rachel Lynde, who does not think Matthew and Marilla fit to raise a child.

Matthew, who is terrified of women, arrives at the train station and finds a girl orphan instead of a boy; the orphanage sent the eleven-year-old Anne Shirley by mistake. Anne’s talkativeness and spirit charm Matthew, who shyly tells Marilla that he wants to keep her. Marilla hesitates at first, but after a trial period, she agrees to let Anne stay on.

Anne is a talkative and happy girl despite living an impoverished life as an orphan. Though she lacks social graces and education, she has a rich and sophisticated fantasy life and an optimistic and generous spirit. Because Anne acts according to her instincts and not according to a code of manners, she unintentionally defies expectations of proper ladylike behavior. She attends church for the first time wearing a wreath of wildflowers, for example, and screams at Mrs. Rachel for making fun of her red hair. Anne tries hard to oblige Marilla and follow her rules of social conduct, but she makes many mistakes, using liniment instead of vanilla in a cake, letting a mouse drown in the plum-pudding sauce, and delivering a heartfelt but ridiculous prayer on her first attempt to pray before bed.

Anne never had real friends before living at Green Gables, so she was forced to invent imaginary playmates. In Avonlea, she meets Diana Barry, a neighbor who quickly becomes her bosom friend. One afternoon Anne invites Diana to tea and accidentally gives her red currant wine instead of nonalcoholic raspberry cordial. Diana returns home drunk, and Diana’s mother, thinking Anne has intoxicated Diana on purpose, forbids the girls to speak. The agonizing period of estrangement lasts until Anne saves Diana’s sister, who is sick with the croup, which causes Mrs. Barry to forgive her.

At school, Anne feuds with a handsome, smart boy named Gilbert Blythe. When they first meet, Gilbert taunts Anne by calling her Carrots and pulling her red braid. Anne is extremely sensitive about her red hair, and Gilbert’s teasing infuriates her. She screams at him and smashes a slate over his head. This incident marks the beginning of a rivalry between Anne and Gilbert, the two smartest pupils, which lasts until the end of the novel.

As Anne grows up, she loses some of her childish flare for the melodramatic and romantic, and turns her spirited attentions to academics. A beloved teacher, Miss Stacy, recognizes Anne’s intelligence and encourages her to join a special group of students preparing for the entrance exam to Queen’s Academy. Her long-standing competition with Gilbert Blythe changes to an affectionate and familiar rivalry when, after four years of mutual silence, they both go to Queen’s Academy. Striving to make Matthew and Marilla proud, Anne devotes herself to her studies wholeheartedly and earns the prestigious Avery Scholarship, which grants her enough money to attend a four-year college the following fall.

Thrilled by her future prospects, Anne goes home to Green Gables. Matthew, who has been having heart trouble, dies of a heart attack. When Anne learns that Marilla is likely to go blind, she decides to stay at Green Gables and teach nearby so that she can care for Marilla, giving up her aspirations for a four-year degree. Gilbert hears of her decision and gives up his post as the teacher at Avonlea school so that Anne can teach there and be closer to Marilla. After five years of rivalry, Gilbert and Anne forge a close friendship. Though her future path has narrowed considerably, Anne remains eternally optimistic and thinks cheerfully about her future.