In the Market Place of Speisesaal (the capital of the Grand Duchy of Pfennig Halbpfennig), the members of Ernest Dummkopf's theatrical company are discovered enjoying a repast in honour of the nuptials of Ludwig, his leading comedian and Lisa, his soubrette. This is taking place before the wedding, since Grand Duke Rudolph has convened all the clergy to discuss the details of his upcoming wedding to the Baroness von Krakenfeldt. All the members of the theatrical company are part of a conspiracy to dethrone the Grand Duke, and all have promised to vote for Ernest Dummkopf as his successor since he will fill all the places at court with members of the troupe, "according to professional precedence."
Ernest, however, is not happy even with this magnificent promotion, for he is head over heels in unrequited love with Julia Jellicoe, an English actress in his troupe "whose dramatic ability is so overwhelming that our audiences forgive even her strong English accent." When she comes to him and announces that she must play the leading role in his "production" of the conspiracy — that is, the wife of the Grand Duke — he is overjoyed. This is cut short when the members of his troupe rush on chasing Ludwig around town, because he inadvertently detailed the entire plot to the Grand Duke's detective.
Dr. Tannhauser, a Notary, explains that an obscure law will solve the problem. Although duels with weapons have been outlawed in Pfennig Halbpfennig, a statutory duel has been instituted: the two disputants draw cards from a pack, and the person with the higher card wins. The person with the lower card becomes a legal ghost, and all his relations, debts, bets, and obligations pass on to the winner. Ludwig will duel with Ernest under this act, and the winner will go to Rudolph and denounce the loser as the mastermind of the plot. He will be pardoned for giving King's ev idence, and since the loser is legally deceased, no further action can be taken against him. When the Act expires (coincidentally, at 3:00 the next afternoon), the "dead" man returns to life, and all will be well again. The duel takes place, and Ernest draws a king before Ludwig pulls an ace.
Meanwhile, the Grand Duke's detective has given his report to the Baroness von Krakenfeldt to give to the Grand Duke. She delivers the letter, but before Rudolph reads it he and the Baroness discuss how well they can live without spending much money at all. When the Grand Duke is once more alone, he reads his detective's report, and learns of the plot against him. He despairs, not knowing how to counter it, when Ludwig comes to confess and be pardoned. Before he can do so, the Grand Duke declares his own despondency, and Ludwig sees a way out of the situation: he will engage Rudolph in a rigged Statutory Duel, and become Grand Duke in his place. He explains this (neglecting to mention his own part in the plot), and the Grand Duke agrees.
This second duel takes place in front of all the townspeople. After Ludwig once more draws an ace, everyone taunts Rudolph, and he threatens massive reprisals when he returns to life the next day. But Ludwig revives the law for a hundred years, and everything seems settled until Julia announces to the company that she must become Ludwig's bride, displacing his fiancee Lisa. The latter is devastated, but must obey as the Notary points out: "Though marriage contracts — or whate'er you call 'em — are very solemn, dramatic contracts (which you all adore so) are even more so.
ACT II
Ludwig and the members of the theatrical company have taken over the court, dressed in the new costumes which Ernest had purchased for an upcoming revival of Trolius and Cressida (because these are the only clothes which are even remotely appropriate), and Ludwig describes how he will run Pfennig Halbpfennig as if it were a modern revival of classical Athens, to fit their costumes, if for no other reason.
When they are alone, Ludwig and Julia discuss how she should play the part of the Grand Duchess. He prefers her to stay in the background, leaving him free to do whatever he wishes, while she explains that her strengths lie in highly dramatic situations. They still have not resolved this when the Baroness von Krakenfeldt arrives for her wedding with Grand Duke Rudolph, fuming because she has not been given the respect she is due by these new courtiers. When she is informed that he has perished, she reminds Ludwig that when he won the duel he also took on all of the previous Grand Duke's commitments, including herself. Julia does not want to give up her role, but the Baroness does have the law on her side.
In the midst of this wedding celebration, a herald appears to announce the imminent arrival of the Prince of Monte Carlo. Not impressed by this formality, Ludwig instructs the members of the troupe to spring out upon the visitors in a manner that is, to say the least, unsuited to a dignified court. Nonplussed by this, the Prince manages to explain that his daughter had been betrothed in infancy to the Grand Duke of Pfennig Halbpfennig, and that he has brought her to the Grand Duchy just before she came of age (when the agreement would have become null and void) because he didn't have the money to do so until recently, when he invented the game of roulette.
It is now the Baroness's turn to be distraught, as her marriage to Ludwig is frustrated because the Princess of Monte Carlo has a prior claim. However, before any other marriage can occur, Rudolph and Ernest arrive from the cemetery, accompanied by the Notary who has reread the law and discovered that in statutory duels, the ace invariably counts as the lowest card in the pack. Thus, Ernest and Rudolph ought never to have died, and Ludwig's revival of the act for a hundred years was not valid. Rudolph resumes his throne, and finds that the Princess of Monte Carlo is quite attractive (and no longer poor). Julia and Ernest are reunited, and when the original Act expires so are Lisa and Ludwig.