As the curtain opens, the nuns of Nonnberg Abbey, in Salzburg, Austria, are singing their daily prayers. Formal and properly reverent, the mood is respectful until one of them whispers, "Have you seen Maria?"
Maria is a young postulant. She was raised in the magnificent mountains surrounding the city, and has trouble concentrating on her duties. She loves to spend time in the hills of her childhood, singing the songs that make her happy ("The Sound Of Music").
The other nuns don't quite know what to do with the ebullient Maria since she seems ill-suited for Abbey life ("How Do You Solve A Problem Like Maria?"). Maria has dreamed of the Abbey since she was a little girl and heard the nuns singing so beautifully. She believes she is where she is meant to be until the Mother Abbess unexpectedly sends for her. To Maria's horror, she is to become a governess "until September".
Swallowing her initial distress at this new turn of events, Maria begins to realize that an adventure lies before her. She decides that she will take charge, and her confidence grows as she sings ("I Have Confidence") of how she will take advantage of this opportunity to prove herself. She will need all the help she can get since she has been assigned to care for the seven children of the von Trapp family. Captain George von Trapp, a widower, is a naval officer without a ship, and he has transferred his military disciplinary style to the raising of his children. Maria's first impression of the rigid Captain does not bode well for her future in his employ. He is overbearing, critical and unbendingly strict. He commands the occupants of his household, including his children, with piercing whistle blasts that Maria immediately finds insulting. When he presents her with her own whistle, she firmly hands it back. Reluctantly, the Captain accepts the whistle…and Maria.
Before long, Maria learns that the children have driven off a number of governesses before her. A remark from the housekeeper gives her the reason for their misbehavior; each time they need a new governess, their father is forced to return home from his numerous trips. Aloof and strict as he is, his children love him and miss the father they remember from before their mother died.
Maria, however, is different from the others, and the children realize right away that this woman won't be scared off so easily. Maria does check her bed for frogs, but doesn't let the children know that she is as nervous as they are.
Her compassion, bubbly personality and ability to relate to them quickly win their respect and admiration. She introduces them to music ("Doe. a Deer…") and they quickly grow to love her, and she them. Their new happiness is threatened, however, when the Captain returns home with his new lady friend to learn that his children have been cavorting about Salzburg dressed in play clothes fashioned from the old curtains from Maria's room. He is furious, and orders her back to the Abbey. Now angry herself at his neglect, Maria begins to tell him off, citing each of the children's need for him and his attentions. The Captain is angry that she would speak to him of his own children, but is halted abruptly by the sound of the children singing sweetly in the distance. He is emotionally overwhelmed by the sound of their music, which he has banned in the house since the death of his wife. He joins them in the song, and they rush into his arms. He apologizes to Maria, and asks that she remain as governess. The children's new interest in music is not lost on a family friend. Max Detweiler, a government official, frequent visitor and somewhat of an uncle to the children, wants them to sing as contestants in the Kaltzberg Festival. For the good of Austria, he says, but the Captain is adamant that his children will never sing in public.
Even as Maria agrees to stay, it becomes apparent that the Captain's new love, Baroness Schraeder, is not happy with the arrangement. She asks that George throw her a party so she can meet his friends. After admitting that, under the threat of Nazi occupation, he doesn't quite know who his friends are anymore, he agrees.
The party is a smashing success. On the terrace, Maria is trying to teach young Kurt an Austrian folk dance. The Captain observes the rather awkward attempt and offers his services to show Kurt how it is done.
While dancing together, both Maria and George sense that something is happening between them. Maria is rattled and quickly leaves his arms, claiming that she does not remember any more steps. This scene is also witnessed by Baroness Schraeder. The highlight of the evening is a performance by the children of a song bidding the guests goodbye ("So Long, Farewell"). George is reluctant to allow them to sing at all since he still considers it inappropriate for his children to sing in public, but Elsa Schraeder convinces him to allow it. The guests are thoroughly charmed. After the party, we see Maria, her bag and guitar in hand, leave the house without a word.
The children are upset by Maria's sudden and unexplained departure. The Captain questions what they did to her. Nothing, they say. He is as perplexed as they are. Elsa tries to make friends with the children, but they are unhappy. The news that their father will marry her is greeted with little enthusiasm.
Back at the Abbey, Mother Abbess asks that Maria be brought to her, since she has not spoken except in prayer since her surprising return. Maria finally admits to Mother Abbess that she likes the Captain, and "can't breath" when she looks into his eyes.
That is the reason she fled her post to the safety of the Abbey. Against Maria's wishes, Mother Abbess tells her that she cannot hide away in the Abbey, and sends her back to the Captain's home while urging her to "Climb Every Mountain" to find and follow the true will of God. Upon her return, the children, who are delighted to see her, tell her of the Captain's upcoming marriage to Elsa. She assures an equally astonished Captain that she will fulfill her obligation…but only until he can hire a new governess. Meanwhile, Elsa is not happy with the return of Maria. She carefully watches Maria and George, and does not like what she sees.
After a revealing confrontation between Max, Elsa and George over the fate of Austria, Elsa and George decide to call off their engagement. When George gives this news to Maria, they finally admit their love ("I Must Have Done Something Good") and make plans to marry.
During their honeymoon, the Anschluss occurs and the Nazis occupy Austria. Max has entered the children in the Kaltzberg Festival without their father's permission, planning to secure it at the last minute. Upon their arrival home, Captain von Trapp receives orders to report immediately to Bremerhaven to enter the German Navy. To buy time to plan an escape, he argues that the children, Maria and he are to sing in the festival. Max backs this statement up by producing a copy of the festival program. George is also surprised to see the program, but covers his ignorance well. It is agreed that the Captain will be escorted directly from the festival to accept his new commission, but the family manages to flee after their last number. They are hidden by the nuns in the Abbey until the Nazi searchers are gone. The Captain claims that the mountains had always been his friends, now they had become his enemies. Mother Abbess assures him that they remain his friends; "I will lift up mine eyes unto the hills from whence cometh my help." With a new conviction that they are doing the right thing, the family begins their long hike up into the mountains, and freedom.