Act I
The pretty maid Adele is labouring away in the rich von Eisenstein household; she dreams of becoming an actress. Alfred, an admirer of her mistress Rosalinde, sings a serenade beneath an open window. In the hope of being left alone with the object of his love, he gives Adele an invitation to a masked ball at Prince Orlofsky's. The girl is thrilled; she just has to think of a reason why her mistress would give the servants time off and how to obtain a suitable outfit. Alas, Rosalinde pays but little heed to her maid's entreaties. The master of the house, the financier Heinrich von Eisenstein, appears. He has had some bad news: for hunting on someone else's estate he must go to prison for eight days. Von Eisenstein considers his lawyer Herr Blind and not himself to be guilty. And here is Blind himself: he has come with promises to have the case reviewed. Rosalinde and Heinrich launch a tirade of invectives at him. The notary departs, man and wife are left alone and Heinrich informs Rosalinde of his unintentional poaching. As the talk progresses, details emerge that von Eisenstein would rather have kept hidden from his wife. They will have to improvise "off the cuff"; Heinrich will be assisted in his virtuoso deception by his friend Falke, a theatre director who has come to visit. Unbeknownst to Rosalinde, Falke suggests his friend goes to the ball under the name of one Marquis de Karambol, going on to the prison the following morning. This risky undertaking fills von Eisenstein with delight. The time for farewells has come: man and wife fondly say goodbye to each other, and Heinrich leaves the despondent Rosalinde alone. Alfred immediately takes advantage of the opportunity afforded to him, makes himself at home in the house of his beloved and starts guzzling wine. Frank, the governor of the prison who has come to arrest von Eisenstein, on taking Alfred to be Rosalinde's husband, carries him off to jail.
Act II
Numerous guests have filled one of the rooms in the home of Prince Orlofsky. The cordial host of the ball invites everyone to drink and be merry until the morning. The disguises and costumes permit the guests to remain incognito – a succession of misunderstandings ensues. Falke is attracted by a lady in a pink dress, still unaware that it is Adele who has borrowed her mistress' gown. Von Eisenstein's attention is drawn to a mysterious duchess dressed as a bat. To the delight of all, she sings a Hungarian song – a csárdás. Orlofsky introduces the delightful Adele, whom he takes to be a baroness, to Heinrich, who he believes is a marquis. Fearful of being discovered, the maid and the master are each forced to play the roles thrust upon them. At last Heinrich is left alone for a tête-à-tête with the beautiful stranger, not suspecting that under the guise of a bat it is his own wife. Rosalinde uses her cunning to get the watch she gave von Eisenstein, allegedly to compare its ticking with the beating of her own fluttering heart.
Meanwhile, the festivities are continuing. The guests drink to fraternity and then dance. As morning draws near, von Eisenstein and Frank must depart for the prison: one under arrest and the other to work. In amazement, Heinrich learns from Frank that the previous evening the latter had already deposited Rosalinde's husband in a cell. Teetering along, von Eisenstein and Frank enter the prison fortress.
Act III
At the prison, the warder is in charge – he is a great lover of having a drink. His chief, who comes to the prison after the ball, must freshen himself up in the bathroom. Von Eisenstein Arrives: the jealous husband wishes to know who his double is. Blind the lawyer appears: Alfred, now sober, has summoned him, no longer wishing to sit in prison on behalf of the true guilty party. The enraged Heinrich runs in and takes the lawyer's cloak and wig – he himself wishes to interrogate the pseudo-von-Eisenstein.
When talking with the "lawyer", Alfred is stunned by his furious reaction to the evening episode at the von Eisenstein household. Rosalinde appears. Her husband is angry at her, though Frau von Eisenstein shows her husband the watch – evidence of his infidelity. Heinrich is unmasked and begs for forgiveness. Several of Prince Orlofsky's guests enter, wishing to continue the festivities. The Bat reveals her incognito persona to all, and Adele immediately joins Falke's theatre company. "Madame Moral has taught her lesson and Monsieur Destiny has been disgraced," as all sum up.