Heidi was just five years old when her aunt Dete took her to the grandfather on the alp. She told him she had looked after the child for four years, namely, from the day when her sister Adelheid, Heidi's mother, had died. Now that she had received a very tempting offer from a distinguished Frankfurt family, it was now his duty to look after the child. And Heidi could no longer stay with the old nanny Ursel in Pfäfers village as the latter was too old and also blind, and the child couldn't learn anything from her anyway. The grandfather was extremely angry about Dete's callous attitude but after she had gone lovingly took the child into his care. From then on Heidi was allowed to accompany Peter the goatherd to the high lying alpine meadows and this routine was good for her body and soul. She could not get enough of looking at the multitude of alpine flowers, was always entranced by the magic light the sunset imprinted on the mountain rocks, loved the goats and, for the first time in her young life, really felt happy.
In winter the alp grandad often drove with Heidi on his sledge to the hut of the goatherd Peter, where he repaired everything that needed to be done. Meanwhile, Heidi, with her lively manner of telling stories, would bring light and happiness into the simple parlour and the life of Peter Goatherd's old blind grandmother.
After two years had gone by the parson made his appearance one day in order to remind the grandfather that the child had to be sent to school as she was now seven years old. But the old grandad thought the village would be bad for Heidi because the people there indulged in evil gossip about each other all the time. On the same day her aunt Dete came up and said she was ready to take Heidi with her to Frankfurt. Heidi would make the lame little daughter of the house very happy if she became her companion. The grandfather was very angry about this request but Heidi agreed to go only because Dete assured her she could return immediately if she didn't like her new home.
In Frankfurt an entirely new world awaited Heidi: instead of mountains, meadows and rustling pine trees, a big grey town with broad streets and many people. Klara, the lame little daughter, soon proved to be a loving friend. Miss Rottenmeier, the governess, however, turned out to be a hysterical tyrant who really hated children and animals. Sebastian, the servant, as secret helper and malicious colleague of the Rottenmeier, highly amused when the latter nearly fainted at the sight of the young kitten Heidi brought home. Tinette, the housemaid, regarded Heidi as an object of derision. Fortunately there was the grandma who with much love and patience taught Heidi to read and pray, and then Klara's father, Mr Sesemann who quickly realised that Heidi's presence was a blessing for his daughter. And finally the doctor (Herr Doktor) who ordered that Heidi should be sent home to Switzerland, having diagnosed her lack of appetite, inability to sleep and sleepwalking, as extreme homesickness. What is sad for the one, is joy for the other: Klara greatly missed her little friend who had given her two such happy, amusing years. But Heidi was overjoyed to be again with her grandfather on the alp, to hear the rustling pines, to observe the birds of prey and to be able to visit the blind grandmother, to whom she could now also read out of the song-book. Every day Heidi went with goatherd Peter and the goats up to the heights where she quickly regained her health.
After Heidi had read the story of the prodigal son to her grandfather, the latter thought over matters and before the winter started he and Heidi and the goats went down to the village where Heidi could go to school. Subsequently Heidi taught Peter how to read and he also attended school every day now and in winter was able to read the texts of the hymns and songs to the blind grandmother, when Heidi was prevented from coming because of the high snows.
In spring they again they went up to the alpine meadows again with the goats. Now and again a letter came from Klara in Frankfurt. She hoped to travel to Switzerland in the summer. The doctor had prescribed a spa cure in Bad Ragaz for her and so she would be able to go and visit Heidi on the alp every day. How she looked forward to seeing everything at last. The mountains, the blossoms, the sunsets, the goats and, of course, her beloved friend Heidi!
However, instead of the Sesemann family, it is only the doctor who came in the late autumn. A few months before his only daughter had died and since then he was bowed down with sorrow. Heidi managed to lift up the spirits of her old friend who had enabled her to return to her home. She encouraged him to pray and quoted the hymn: "Commend your ways and your sick heart to the most faithful care of him who steers the heavens, the clouds, air and winds, gives ways and course and orbit. He will also find the ways for you to tread." The doctor left Switzerland strengthened and consoled. He related to Klara again and again how lovely it was to be with Heidi on the alp.
The next summer the Sesemanns came after all. Klara and the grandma rode on horseback to the alp. Heidi was so happy at their arrival, she jumped with joy. But goatherd Peter was not so happy. He was afraid that Heidi would no longer have any time for him. In wild rage he pushed Klara's wheelchair down the mountain and it lay there, broken to pieces. With the grandfather's care, the good pure air and the goat's milk Klara became stronger every day and learned to stand on her feet and walk. When Mr Sesemann arrived he could hardly believe his eyes as Klara walked towards him. Peter had a guilty conscience for what he had done, but everything turned out well at the end. He even was rewarded by the grandma: every week ten rappen for the rest of his life.
When Mr. Sesemann asked the grandfather how he could repay him for the good care of his daughter Klara, the alp grandad said he had only one wish, that Heidi should never have to earn her bread working for strangers. Mr Sesemann assured him that in future Heidi would have two protectors, for the doctor intended shortly to take up residence in the neighbourhood of Maienfeld. He had felt so well in the child's company that he wanted to stay near her for the rest of his life. Then Heidi was asked if she had a wish and she replied that she would like the blind grandmother to have the big bed from Frankfurt with the eiderdown and pillows so that the would never freeze again.
The next morning tears flowed as Klara departed. But she promised Heidi that she would come every summer to her in the holidays. The Sesemanns kept their promise. Peter received his tenner punctually and the large bed from Frankfurt arrived a few days later.
The doctor came to the village and bought the old building which served the alp grandad as winter quarters. The doctor had it restored and rebuilt so that he could live in the same house as Heidi. He wanted Heidi to take care of him in his old age and for that she would be his sole heiress. These words made the alp grandad happy for he now knew that Heidi would be well looked after for the rest of her life.