Seven-year-old Sara Crewe is sent to live at Miss Minchin's boarding school in New York City. Her father, Captain Crewe, is a doting young man who leaves instructions that his daughter is to be given a private room with a parlor, a maid, and anything else she might desire in his absence. The school's headmistress, Miss Minchin, privately believes that Sara must be intolerably spoiled due to her father's indulgence, but Minchin is impressed by Captain Crewe's fortune and quickly turns the well-dressed, well-mannered Sara into a show pupil. However Miss Minchin privately dislikes Sara because she is a selfish, domineering woman who senses she has met her match in Sara.
Far from being spoiled, Sara is a bright, imaginative, and empathetic child who loves books and storytelling. In short order she befriends even the most outcast of her fellow pupils, as well as the scullery maid Becky. Miss Minchin does not approve of such friendships, but she is willing to tolerate them for fear that Sara will complain to her father. A few of the older students are openly jealous of Sara's fortune and give her the mocking nickname of "Princess Sara" in reference to her wealth and perfect manners. The nickname first embarrasses Sara, but soon she adopts it as a reminder to be generous to others.
On Sara's eleventh birthday, news arrives that Captain Crewe has died in India from brain fever, having lost all his fortune due to diamond mine investments made by a friend. Sara is left a pauper, her school bills unpaid, and Miss Minchin, now saddled with a student she has never liked, turns Sara into a servant, requiring her to work without pay in exchange for food and a place to live. Sara is given a room in the attic next to Becky, the scullery maid she befriended.
For the next three years, Sara is overworked and half-starved. In her loneliness, she uses her imagination to comfort herself, turning her attic room into the Bastille and Becky into a fellow prisoner. Sara does her best to keep up with her studies and to remember her good breeding and manners, even though this makes her unpopular with her fellow servants and with Miss Minchin, who believes that Sara has not yet humbled herself in her new station. Sara tries harder than ever to pretend she is a princess in order to keep herself from despair, but discovers that even her imagination is not enough to pretend away cold and hunger.
A second section of the story develops when Sara sees a new family moving into the house across the street. Having been born in India, she recognizes many of the furnishings as Indian and the master's servant as an Indian lascar. Upon learning that the master of the house is ill with the same "brain-fever" that killed her own father, Sara begins to pity him and weaves him into her fantasies, referring to him in her mind as "the Indian gentleman." The Indian lascar takes up residence in the attic across from Sara's own, and she is able to speak to him in his native Hindustani. Intrigued, the lascar, with the help and encouragement of his master, slips into Sara's attic while she is asleep and leave her gifts of warm bedding, food, and books. Sara awakens the next morning thinking that "the Magic" of her fantasies has somehow been made real.
Every day, the comforts in the attic are added to, and Sara shares them with Becky. Finally a delivery of new clothes comes for Sara, and Miss Minchin, worried that someone has revived an interest in Sara's case, allows her to attend school with the other students. When Sara returns to her attic, she finds that the lascar's pet monkey has escaped and taken refuge in her room. The following morning, she crosses the street to return the monkey and to at last meet "the Indian gentleman", whose real name is Carrisford.
Carrisford enquires as to Sara's name and circumstances, only to realise that Sara is the formerly missing child of Captain Crewe. Carrisford, it is revealed, was the friend who "lost" Captain Crewe's fortune. After the captain died in despair, the fortune reappeared, multiplied manifold. Knowing that Crewe had a child in boarding school, Carrisford has spent the last two years searching schools throughout Europe for Sara. As Sara had been expelled from her pupilship and demoted to the status of a scullery-maid, Carrisford's search had thus far been unsuccessful.
Miss Minchin, upon learning that Sara's fortune has been returned to her, attempts to convince Sara into returning to her school. But Carrisford knows about Miss Minchin's cruelty towards Sara and refuses. Sara then sends for Becky to come and live with her as her own maid, and Miss Minchin is further humiliated.