ACT I
Inside St. Katharine's church the young knight Walther von Stolzing tries to get the attention of Eva Pogner, who is at her devotions with her attendant, Magdalene. When Walther tells Eva he loves her, she responds enthusiastically, but explains that she is to be married the next day to whoever wins a song contest sponsored by the Mastersingers' Guild. Walther immediately determines to enter the contest. Meanwhile David, Magdalene's fiancé, comes in with other apprentices to set up the church for a preliminary song trial. The two women leave, after asking David to instruct Walther. David tells Walther about his own artistic training with the cobbler, Hans Sachs, and explains the rules of the trial. Pogner, Eva's father, comes in with Beckmesser, the town clerk, who is confident of winning the contest. The Mastersingers arrive, and Pogner explains that as a sign of tradesmen's respect for art, he will give his daughter and all his wealth to the winner of this contest. A debate over the rules of the trial arises when Hans Sachs suggests that Pogner's daughter should be able to choose her own mate. Pogner is insistent: Eva can reject the winner, if she chooses, but will then remain a spinster; she must only marry a Mastersinger. As Walther begins to sing, Beckmesser as judge furiously marks his mistakes on a slate. All of the Masters except Hans Sachs dislike Walther's song. As the Masters exit, Sachs is left to ponder what has occurred.
ACT II
Later that day, as apprentices are finishing their work, David tells Magdalene that Walther failed the trial. Eva enters with her father; when Pogner retires for dinner, Eva stays behind to learn what happened. Sachs sets up a bench in his doorway, but the smell of elder and thoughts of Walther's song distract him from his work. Eva comes to Sachs for help. When Sachs pretends disdain for Walther, Eva's dismay at his opinion confirms Sach's suspicions that she loves the young knight. Walther comes looking for Eva; he tells her that he failed the trial, and the two plot an elopement. Sachs, having overheard their plan, lets a bright beam of light fall so they are forced to hide in the shadows. As Beckmesser comes in with a lute, ready to serenade Eva whom Magdalene impersonates in her window — Sachs launches into a loud cobbler's song. Beckmesser asks him to stop, and Sachs agrees to act as "marker" for him, hammering his shoes only when Beckmesser sings a wrong note. Sachs pounds away at his shoes mercilessly. David enters, and seeing Magdalene in the window with Beckmesser singing to her, he attacks the clerk. Neighbors in their nightgowns join in a huge free-for-all. Walther and Eva try to run away amid the chaos, but Sachs pulls Walther into his house and pushes Eva into hers. Townspeople go home as the night watchman blows his horn.
ACT III
Deep in his reading, Hans Sachs hardly notices David when he comes in to apologize for his behavior the night before. When David leaves, Sachs ponders the cruelty of the world. Walther comes in to tell Sachs of his dream; Sachs, suspecting a great song is in the making, takes down the words and teaches Walther how to write a masterpiece.
The two men leave the room and Beckmesser enters, finds Walther's love song, and plans to steal it. Sachs enters and Beckmesser accuses him of trying to win Eva for himself. Sachs gives the love song to the clerk, telling him he may sing it at the contest. Eva enters and sees Walther, who sings part of his love song to her. Sachs gives the couple his blessing, and when David and Magdalene come in, he tells David his apprenticeship is over and that he may now marry Magdalene. Rejoicing, they all leave for the contest.
In a meadow near the river the townspeople of Nuremberg are gathered. Tailors, cobblers, bakers, and apprentices enter in processions, waving the flags of their guilds. The Mastersingers appear ceremoniously, honoring Hans Sachs, who is deeply moved by their tribute. When the song contest begins, Beckmesser steps forward nervously. He sings the song he has stolen, garbling the words so badly that the crowd laughs at him. Beckmesser turns furiously on Sachs. Sachs summons Walther, who, in singing his song, wins the Mastersingers' prize. He shocks everyone by refusing to become a master. Sachs lectures him on the value of tradition. Walter yields, and is awarded Eva. The crowd praises Sachs.