Act 1
The embassy in Paris of the poverty-stricken Balkan principality of Pontevedro is holding a ball to celebrate the birthday of the sovereign, the Grand Duke. Hanna Glawari, who has inherited twenty million francs from her late husband, is to be a guest at the ball – and the Pontevedrin ambassador, Baron Zeta, is scheming to ensure that she will keep her fortune in the country, saving Pontevedro from bankruptcy. The Baron intends that Count Danilo Danilovitsch, the first secretary of the embassy, should marry the widow; unfortunately for this plan, Danilo is not at the party, so Zeta sends Danilo's assistant Njegus to fetch him from Maxim's.
Danilo arrives and meets Hanna. It emerges they were in love before her marriage, but his uncle had interrupted their romance because Hanna had had nothing to her name. Though they still love each other, Danilo now refuses to court Hanna for her fortune, and Hanna vows that she will not marry him until he says "I love you" – something he claims he will never do.
Meanwhile, Baron Zeta's wife Valencienne has been flirting with the French attaché to the embassy, Count Camille de Rosillon, who writes "I love you" on her fan. Valencienne puts off Camille's advances, saying that she is a respectable wife. However, they lose the incriminating fan, which is found by embassy counsellor Kromow. Kromow jealously fears that the fan belongs to his own wife, Olga, and gives it to Baron Zeta. Not recognising it, Baron Zeta decides to return the fan discreetly, in spite of Valencienne's desperate offers to take it "to Olga" herself.
On his way to find Olga, the Baron meets Danilo, and his diplomatic mission takes precedence over the fan. The Baron orders Danilo to marry Hanna. Danilo refuses, but offers to eliminate any non-Pontevedrin suitors as a compromise.
As the "Ladies' Choice" dance is about to begin, Hanna becomes swarmed with hopeful suitors. Valencienne volunteers Camille to dance with Hanna, privately hoping that the Frenchman will marry her and cease to be a temptation for Valencienne herself. True to his bargain with the Baron, Danilo circulates the ballroom, rounding up ladies to claim dances and thin the crowd around the wealthy widow. Hanna, however, chooses the one man who is not apparently interested in dancing with her: Danilo, who immediately announces that he will sell his dance with Hanna Glawari for ten thousand francs, with the proceeds to benefit charity. This extinguishes the remaining suitors' interest in the dance. After they have left, Danilo attempts to dance with Hanna, who refuses in annoyance. Nonchalantly he proceeds to waltz by himself, eventually wearing down Hanna's resistance, and she falls into his arms.
Act 2
Scene 1
The next evening, everyone is dressed in Pontevedrin clothing for a garden party at Hanna's house, now celebrating the Grand Duke's birthday in his own country's fashion. Hanna entertains by singing an old Pontevedrin song: "Es lebt' eine Vilja, ein Waldmägdelein" ("There lived a Vilja, a maid of the woods"). Meanwhile, Baron Zeta fears that Camille will spoil his plan for Hanna to marry a Pontevedrin. Still not recognising the fan as Valencienne's, the Baron orders Danilo to discover the identity of its owner, whom he correctly assumes to be Camille's married lover. The two men, along with Njegus, arrange to meet that evening in Hanna's garden pavilion to discuss Danilo's findings, as well as the problem of securing the widow's fortune for Pontevedro. Seeing the fan, Hanna takes the message on it to be Danilo's declaration of love for her, which he denies. His inquiries regarding the fan prove fruitless, but do reveal infidelities committed by some of the wives of embassy personnel.
Scene 2
That evening, Camille and Valencienne meet in the garden, where Valencienne insists that they must part. Discovering the fan, accidentally left behind by Danilo, Camille begs Valencienne to let him have it as a keepsake. Valencienne agrees, writing "I'm a respectable wife" on it as a rejoinder to Camille's "I love you." Camille persuades Valencienne to join him in the pavilion so that they can say their goodbyes in private. This is of course the same pavilion where Danilo, the Baron, and Njegus have agreed to meet, and the latter, arriving first, locks the door when he spots people inside. Baron Zeta and Danilo follow, but Njegus quickly arranges with Hanna to change places with Valencienne. Camille emerges from the pavilion with Hanna, who announces that they plan to marry, leaving the Baron distraught at the thought of Pontevedro losing Hanna's millions and Valencienne distraught at losing Camille. Danilo is furious, and tells the story of a Princess who cheated on her Prince ("Es waren zwei Königskinder)" before storming off to seek distraction at Maxim's. Hanna realises that Danilo's anger over her engagement to another man proves that he loves her, and she rejoices amid the general despair.
Act 3
Act 3 is set at a theme party in Hanna's ballroom, which she has decorated to look like Maxim's, complete with Maxim's grisettes (can-can dancers). Valencienne, who has dressed herself as a grisette, entertains the guests ("Ja, wir sind es, die Grisetten"). When Danilo arrives, having found the real Maxim's empty, he tells Hanna to give up Camille for the sake of Pontevedro. Much to Danilo's delight, Hanna replies truthfully that she was never engaged to Camille but was protecting the reputation of a married woman. Danilo comes very close to declaring his love for Hanna, but stops himself from doing so when he remembers her money and his proud refusal to court her for it. Njegus produces the fan, which he picked up earlier, and Baron Zeta finally remembers that it belongs to Valencienne. He swears to divorce his wife and marry the widow himself, but Hanna stops him by declaring that she will lose her fortune if she remarries. At this, Danilo promptly confesses his love for her and asks Hanna to marry him. Hanna triumphantly accepts, adding that she will lose her fortune only because it will become the property of her new husband. Valencienne assures Baron Zeta of her fidelity by pointing out her reply to Camille's declaration of love written on the fan: "Ich bin eine anständige Frau" ("I'm a respectable wife"). All ends happily.