The storm clouds are gathering above the Viennese Herr Von Eisenstein's house. He has been sentenced to a five-day prison term for duelling. While he is away battling in court for acquittal, his wife Rosalinda is courted by and old suitor, Alfred, the famous tenor. Alfred tries to persuade his old flame to make good use of her brief grass widowhood. Rosalinda is about to be completely deserted: her chambermaid Adele tries to get the night off by telling her mistress that her ‘poor old aunt’ is deathly ill. In actual fact, Adele secretly wants to go to the ball at Prince Orlofsky's, to which she has been invited – so she is aware – by her sister Ida the ballerina.
Eisenstein arrives home in deep distress. He is fighting with his lawyer, Dr Blind. His prison term has been extended to eight days because of Blind’s incompetence. Blind promises to appeal, but Eisenstein throws him out. He has only been allowed to come home for a farewell dinner. He sends Adele to the nearby restaurant to get him some comforting delicacies.
The lawyer Dr Falke comes to visit. He used to be the family’s friend until Eisenstein played a nasty trick on him. Three years ago the two of them had gone to a costume ball dressed as a butterfly and a bat. On the way home, Eisenstein got the doctor drunk and left him asleep in the park in his bat costume. Ever since everyone in Vienna has called him the Batty Doctor. However, this time – so it appears – Dr Falke has not come to gloat. He convinces Eisenstein to come to the ball at Prince Orlofsky's and postpone reporting to gaol (where he can recover from the spree) until midnight. He even asks Eisenstein to bring with him his famous chiming watch, used so effectively in his many conquests. Dr Falke secretly also invites Rosalinda to Orlofsky’s, and provides her with a costume.
Adele returns the bountiful dinner, but her master hurries off with his crony, Dr Falke. Then, on the spur of the moment, Rosalinda decides to let Adele off for the night, and resigning herself to her fate she allows Alfred, serenading under her window, to enter, and continue at the dinner table. However, their intimate rendezvous is interrupted when Herr Frank, the director of the prison where Eisenstein is to spend his gaol term, enters. He has come to personally escort Eisenstein to his prison. Rosalinda begs Alfred to say that he is Eisenstein, to avert a scandal. Alfred agrees and leaves with Frank to take Eisenstein's place in prison.
Receiving his guests in his lavish palace, Prince Orlofsky is lamenting his terminal boredom and eventually ‘shoots himself in the head’ with a bottle of vodka. Dr Falke assures him that tonight he will laugh: he has planned a little comedy, whose unsuspecting actors enter the scene one after the other.
Arriving in Rosalinda’s dress, Adele is introduced as an actress. Eisenstein is introduced as the Marquis de Renard, and is flabbergasted to see his chambermaid at the ball. Adele is equally horrified to see her master, but continues to insist that she is an actress. Eisenstein has a gruelling conversation in French with Chevalier Chagrin, who is in fact Frank. The ‘two illustrious’ Frenchmen woo Adele and Ida, while Falke introduces Eisenstein to the mysterious Hungarian countess, who is really Rosalinda. Eisenstein flirts with the woman, but loses his chiming watch in the process. He tries desperately to get it back, but his time is up, and he must begin his prison sentence.
Frosch, the gaoler, delivers an intoxicated soliloquy in the prison director’s office, when an equally inebriated Frank comes in. They have not even weighed up the tricky situation when Adele and Ida arrive. They take Frank (or Chevalier Chagrin, as they know him) by his word, and ask him to help Adele break into show business – she displays talent in a brilliant solo.
Next, Eisenstein enters and is taken aback to find that his drinking mate, Chevalier Chagrin, is the director of the prison. His surprise is even greater when he learns that Herr Von Eisenstein was arrested the evening before, while he was at home, dining with his wife.
Meanwhile, Alfred impatiently waits for the lawyer he has sent for. Rosalinda arrives, wanting to save the day. However, Eisenstein returns, disguised as the lawyer. Instead of help, he swears to take revenge on his unfaithful wife and her suitor. But Rosalinda counters his accusation by producing the watch she swindled out of him as a Hungarian countess. Eisenstein then changes tactic and denies his identity, but Adele identifies her master.
Finally, Prince Orlofsky and all the party guests pour into the gaol. Dr Falke announces the whole situation was a joke – the revenge of the Bat. Eisenstein is reassured in his belief that Alfred too was just part of the joke. All is forgiven, everything is back to normal, only Adele becomes and actress, with the help of Orlofsky.