Belfiore, impersonating the Polish king Stanislaus, is a guest at the home of Baron Kelbar and he comments to himself on his change of fortune. The Baron has recently arranged a political alliance by betrothing his daughter, Giulietta, to La Rocca, the Brittany Treasurer, but Giulietta prefers La Rocca's nephew, Edoardo. Another undesired marriage involves the Baron's niece, the Marchesa del Poggio, a young widow who is in love with Belfiore. She has become engaged to the Count of Ivrea because Belfiore has been unable to commit himself to marrying her, in spite of the fact that he does love her.
Knowing of the Marchesa's imminent arrival and concerned that she might reveal his false identity as the King, Belfiore writes to Stanislaw and asks to be released from his commitment. Edoardo reveals his predicament to the "King" and begs to be taken to Poland with him in order to forget about the woman he loves. In addition, when the Marchesa arrives and, upon being introduced to Belfiore as "the King", she pretends not to recognize him. Likewise, he pretends not to recognize her, but she is determined to test him by proclaiming her love for the Count.
Giulietta is alone with her attendants and expresses unhappiness in having to marry an old man. When the Count and La Rocca arrive, followed in succession by Belfiore and Edoardo and then the Marchesa (who was planning to help the lovers), Belfiore draws the Count and La Rocca away on the pretext of discussing state business, leaving the young lovers alone with the Marchesa.
Maintaining his role as the King, Belfiore makes the Treasurer an offer of advancement which would include marriage to a rich widow. By accepting, he agrees not to marry Giulietta. When the treasurer tells the Baron that he refuses to marry his daughter, the Baron is affronted and challenges him to a duel. To add to the confusion all around, the Marchesa immediately proposes that Giulietta and Edoardo be married immediately. However, the false King returns and proposes that he will decide on a solution that will satisfy everyone.
Following the "King's" pronouncement, the servants are mystified and they sing a carefree chorus which leads to Edoardo seeking their support and announcing his hope of still be able to marry Giulietta.
Belfiore, the Treasurer, and Giulietta enter discussing the reasons for the Baron's opposition to his daughter's marriage to Eduardo. Giulietta explains that the young man's poverty is the main objection and so Belfiore immediately rules that the Treasurer must give up one of his castles and give over a sum of money to the young man, and then all will be well. The latter is somewhat reluctant to disobey his sovereign, but seeks a way out of his duel with the Baron.
Belfiore and the Marchesa meet on the veranda, the former still unable to reveal who he really is. This incenses the lady, who boldly states that it is her intention to marry the Count of Ivrea. However, she cannot understand why Belfiore is taking so long to reveal himself and still hopes for his change of heart. Since Eduardo has pledged to join the "King" when he goes to Poland, Giulietta is determined to get the King to rescind the commitment. The Count enters and the Marchesa once again states that she will marry the Count. However, Belfiore immediately forbids the marriage for 'reasons of state' and announces that he and the Count must leave for Poland to deal with state business.
All express their feelings, but things come to a halt when a letter arrives for Belfiore. It is from King Stanislaw announcing his safe arrival in Warsaw and releasing Belfiore from his task of impersonating him. In return, the king has created him Marshall of France. Before dropping the disguise, the "King" proclaims that Giulietta and Eduardo are to be married and, having received the Baron's consent, reads the true king's letter and reveals his true rank. He expresses his love for the Marchesa and all ends happily with the prospect of two weddings.