Stargirl is the story of Leo Borlock and Susan "Stargirl" Caraway, two students at Mica High School in small-town Arizona. Mica is a staid and conformity-driven environment, and the arrival of the homeschooled Stargirl shakes things up in a variety of ways. The story deals with the school's rejection of Stargirl, her attempts to assimilate, and her fledgling romance with Leo. At the close of the novel Stargirl leaves and the two break up, feeling confused and unsure about their futures and their places in society.
The book begins with a brief introduction to Leo at the age of twelve, and chronicles his move from his home state of Pennsylvania to Arizona. Before the move, his Uncle Pete gives Leo a porcupine necktie as a farewell present, inspiring him to collect more like it. After his collection is mentioned in a local newspaper, Leo receives a second porcupine necktie for his birthday, left anonymously on his doorstep, and the story begins.
The story picks up four years later with the arrival of a new classmate, Susan Caraway, at Leo’s high school. Susan goes by the name Stargirl, and her behavior is unusual. Teens at Mica Area High School prize conformity above all else, but Stargirl seems not to care what anyone else thinks of her. She comes to school in strange outfits—kimonos, buckskin, 1920s flapper clothes, and pioneer clothing with no makeup. During each class period she decorates her desk with a tablecloth and flowers. She dances in the rain and strums a ukulele every day during lunch while singing "Happy Birthday" to kids she has never met. She attends strangers’ funerals and cheers for both teams during sporting events. Her behavior is so unusual that at first the student body does not know what to make of her. Popular student Hillari Kimble declares that Stargirl is a fake, and speculation and rumors abound.
When Hillari orders Stargirl not to sing to her on her birthday, Stargirl keeps her promise—she sings Hillari’s name, but directs the song to Leo and mentions that she thinks he is cute. Leo gradually becomes intrigued by the mystery of Stargirl, following her after school and passively observing her odd actions and the student body’s reactions. Though at first rejected by most of the highschoolers, Stargirl gains a measure of popularity by joining the cheer-leading squad. Students begin to mimic her behavior, and at lunch she no longer sits alone. Her antics on the squad spark a boom in audience attendance at sporting events. Leo privately celebrates the outburst of individuality taking over the school, even though his own shy demeanor keeps him from participating.
Stargirl has a small wagon the size of a fist, which she calls her happy wagon. She has 10 stones in her wagon and every time something sad happens, she takes one out. Whereas, when something happy happens, she puts one in. This wagon is supposed to remind her that more good things happen than bad.
Stargirl’s popularity is short-lived, however. Thanks in part to her efforts, the basketball season is the best in the school’s history and school spirit flourishes. Students begin to resent Stargirl’s habit of cheering for both teams which made her very popular throughout the school. Their anger comes to a head during a filming of the student-run television show, Hot Seat, which is run by Leo and his best friend Kevin. During the show a "jury" of students is invited to ask questions of the guest star. This show’s guest is Stargirl, and though the questions start innocently the session soon turns into an embarrassing attack on Stargirl’s personality and actions. An advising teacher cuts the show short, and it is never aired, but the damage is already done. Shortly thereafter, Stargirl comforts a hurt player from the opposing team during a playoff basketball game, and is blamed for Mica High’s subsequent loss. She is shunned by the entire student body, except for her friend Dori Dilson, Leo, and, to some extent, Kevin.
Leo surprises Stargirl for her kindness, bravery, and nonconformity, and the two begin a tentative romance. They spend more and more time together, and Leo experiences her unusual lifestyle and starts helping her with various projects, such as leaving cards for people they don't know and dropping change on the sidewalk for others to find. For a while he is deliriously happy with their relationship, but as reality sets in, he realizes that the entire school is shunning both of them. In response, Leo convinces Stargirl to act more "normal." She starts going by her real name, Susan, wears typical teen clothing, and becomes generally obsessed with being accepted and popular. These actions fail to produce results.
Stargirl decides that the best way to become popular is to win the state’s public speaking competition. She dreams she will win the contest and get a victorious party. She wins the finals, and her eccentric and creative personality helps her achieve victory. But when she returns to the school expecting to receive a hero’s welcome, Stargirl is bitterly disappointed that only three people show up. Realizing that she has achieved nothing by trying to fit in, and has betrayed her true self in the process, Stargirl reverts to her former personality. Leo is not able to cope with the shunning that comes with being Stargirl’s boyfriend and breaks off their relationship, confused about his feelings and unable to overcome his need to be accepted by the other students.
Despite the breakup, Stargirl attends the school’s dance—the Ocotillo ball—with her friend Dori. Leo watches from a distance as Stargirl arrives at the dance on a bike covered in sunflowers. Though initially ignored by the other attendees, something about Stargirl begins to attract attention and temporary acceptance. She convinces the bandleader to play the "Bunny Hop," and gradually the other students come to join her in the dance until eventually the only people not in line are Hillari Kimble and her boyfriend Wayne Parr. When the dance ends, Hillari confronts Stargirl, tells her that she always ruins everything, and slaps her. Stargirl returns Hillari's attack with a polite kiss on the cheek. No one in the town sees Stargirl again after that night, and Leo learns from mutual friend Archie whom he seeks advice from that she and her family have moved away to Pennsylvania.