The story follows young Heidi, an orphan sent to live with her reclusive grandfather, known as Alm-Uncle, high in the Swiss Alps. Initially feared by the local villagers due to his stern demeanor, the grandfather slowly softens under the warmth and affection of the spirited child. Heidi thrives in the majestic mountain environment, finding joy in her friendship with Peter the goatherd and his blind grandmother.
However, Heidi's peaceful alpine life is abruptly interrupted when her aunt Dete carries her away to Frankfurt to act as a companion to Clara Sesemann, a wealthy invalid girl confined to a wheelchair. While in Frankfurt, Heidi struggles with severe homesickness and a deep longing for the mountains, though she teaches Clara to read and brings comfort to her life.
The emotional weight of her exile eventually manifests as sleepwalking, prompting a kind doctor to intervene and send her back to her beloved grandfather. Upon her return, Heidi finds her grandfather reconciled with the village and brings immense joy to the blind grandmother.
The narrative concludes with preparations for a joyful reunion when Clara and her grandmother plan to visit the Alps, promising continued healing and happiness for all involved.