The widowed, retired Austrian naval officer, Captain Von Trapp (Christopher Plummer) has made his Austrian home one of overly restrictive and harshly enforced discipline, one that, most unintentionally, causes his seven children to be underfed when it comes to joy and love. Being a nun living in a convent is similarly restrictive and unfulfilling for Maria (Julie Andrews), who breaks rules to try to change it. The reverend mother (Peggy Wood) decides that Maria, who is not cutting it as a nun, should leave and take on a job as governess at the nearby Von Trapp household in Salzburg.
Through music and various outings, Maria gives the children a taste of a more fulfilling, joyous, life than they have ever known, and they come to love her very dearly. The Captain grows closer to his children, too, coming to understand the value and beauty of the freedoms that Maria has given them. Ironically, the freedom of all Austrians to live their lives to the fullest is in danger, for it is 1938, and Germany is marching into Austria. The Captain is a patriot, passionate about the fulfilling life that Austria has always offered its citizens.
In his personal life, the Captain is having a romance with a wealthy, cultivated, and lovely Baroness (Eleanor Parker), but he is becoming more and more captivated by Maria, and is falling in love with her, and she, too, feels growing affection for him. She is a nun, however, and unschooled in dealing with the situaiton. Frightened by the developments, Maria runs back to the convent, where the reverend mother convinces her that she must face, rather than run from, the situation, causing Maria to return to the Captain's home. It seems, though, that she is too late, learning that the Captain and the Baroness have become engaged.
The Captain, who had surely concluded that he could never have Maria for a wife, confides to the Baroness that he loves Maria, but the Baroness admits she had sensed it long ago, and the engagement is called off. The Captain and Maria marry, but an ugly situation befronts them upon return from their honeymoon -- the Captain has been summoned, in a telegram, by the Third Reich to serve in its navy.
Due to the Captain 's unwillingness to serve the Third Reich, the Captain and Maria resolve to leave Austria, and, after escaping the pursuit of some Nazi officers, they set out, with the children, for the mountains of Switzerland on foot.