An orphaned girl named Heidi is sent to live with her paternal grandfather by her maternal Aunt Dete, who has been looking after Heidi since she was a baby. Heidi's grandfather initially dislikes having Heidi around because she interferes in his routine. But when her grandfather hurts his leg, Heidi helps nurse him back to health, and during this time the two bond together. Heidi meets the local goatherd, a boy named Peter, and often goes with him and the village's goats on their daily grazing trips higher up the Swiss Alps.
One day, however, Heidi's Aunt Dete arrives to take Heidi away again, saying that a wealthy family in Frankfurt, Germany, wants Heidi to come live with them. Heidi's grandfather reluctantly lets her go. Heidi arrives at the house in Frankfurt, where she learns she's supposed to become the companion of a wealthy but invalid girl named Klara. Klara's Governess and guardian Fräulein Rottenmeier disapproves of Heidi's simple country ways, but Klara likes Heidi and insists that she stays. Heidi brings joy into Klara's life, especially when she gives Klara a basket of kittens as a present. When Rottenmeier discovers the kittens, Heidi is locked in the rat-infested basement.
Peter and the country animals come to Heidi's rescue. Together with Klara, the three travel to the Wunderhorn without telling Rottenmeier. At this time, Klara's father returns to Frankfurt after being away on business, and is angered that his daughter has disappeared. He immediately leaves for the Wunderhorn, and this time Rottenmeier and the butler Sebastian take the opportunity to flee.
The three children travel up the mountain, but Klara stops halfway so that Heidi can run on ahead without pushing her wheelchair. Heidi runs ahead and is joyfully reunited with her grandfather. Back halfway down the mountain, Klara's kitten Snowball is attacked by a hawk. Klara crawls out of her wheelchair and uses a stick to fight off the hawk. Klara then discovers that she is able to stand. Klara's father arrives and together they celebrate Klara's mobility and Heidi's return.