The action takes place in a secluded villa in rural Umbria at the beginning of the XX century. The room reproduces the decoration of the throne room of Henry IV, but to the right and left of the throne are two large contemporary portraits, one of which depicts a man in the costume of Henry IV, the other a woman in the costume of Matilda Tuscan. Three young men - Arialdo, Ordulfo and Landolfo - dressed up in XI century costumes, explain to the fourth, just taken into service, how to behave. The newcomer - Bertoldo - can not understand what Henry IV is in question: French or German. He thought that he should depict the close Henry IV of France, and read books on the history of the XVI century. Arialdo, Ordulfo and Landolfo tell Bertoldo about Henry IV of Germany, who waged a fierce struggle with Pope Gregory VII and, threatened with excommunication, went to Italy, where he humiliatedly apologized at the Pala’s castle, owned by Matilda Tuscan. The young men, having read books on history, carefully portray knights of the 11th century. The most important thing is to answer in tone when Henry IV addresses them. They promise to give Bertoldo books on the history of the 11th century, so that he will quickly become comfortable with his new role. Modern portraits covering niches in the wall where medieval statues should have stood seem to be an anachronism to Bertoldo, but the rest explain to him that Henry IV takes them in a completely different way: for him it's like two mirrors reflecting the animated images of the Middle Ages. Bertoldo all this seems too abstruse, and he says he does not want to go crazy.
An old valet Giovanni enters in a tailcoat. Young men start jokingly chasing him away as a person of a different era. Giovanni tells them to stop the game and announces that the owner of the castle, Marquis di Nolly, arrived with a doctor and several other people, including the Marquise Matilda Spina, depicted in the portrait in the costume of Matilda Tuscan, and her daughter Frida, the bride of the Marquis di Nolly. Signora Matilda looks at his portrait, painted twenty years ago. Now he seems to her a portrait of her daughter Frida. Baron Belcredi, the marquise's lover, with whom she dives endlessly, objects to her. The mother of the Marquis di Nolly, who died a month ago, believed that her crazy brother, who imagined himself Henry IV, would recover, and bequeathed to her son to take care of her uncle. The young Marquis di Nolly brought a doctor and friends in the hope of curing him.
Twenty years ago, a company of young aristocrats decided to organize a historical cavalcade for entertainment. The uncle of the Marquis di Nolly dressed up as Henry IV, Matilda Spina, with whom he was in love, - Matilda Tuscan, Belcredi, who came up with a cavalcade and who was also in love with Matilda Spin, rode behind them. Suddenly the horse of Henry IV stood on its hind legs, the rider fell And hit the back of his head. Nobody attached much importance to this, but when he came to, everyone saw that he takes his role seriously and considers himself a real Henry IV. The madman’s sister and her son pleased him for many years, turning a blind eye to his insanity, but now the doctor decided to present to Henry IV both the marquise and her daughter Frida, like two drops of water like a mother like she was twenty years ago - he believes that such a comparison will give the patient the opportunity to feel the difference in time and generally cure him. But for starters, everyone is preparing to appear before Henry IV in medieval costumes. Frida will portray his wife Bertu of Susi, Matilda her mother Adelaide, the doctor - Bishop Hugo of Clunius, and Belcredi - the Benedictine monk accompanying him.
Finally, Arialdo announces the arrival of the emperor. Henry IV is about fifty years old, he has dyed hair and bright red spots on his cheeks, like dolls. On top of the royal dress on it is the robe of the penitent, as in Canossa. He says that since he is wearing penitential clothes, he is now twenty-six years old, his mother Agnes is still alive, and it is too early to mourn her. He recalls various episodes of “his” life and is going to apologize to Pope Gregory VII. When he leaves, the excited marquise almost without feelings falls into a chair. In the evening of the same day, the doctor, the Marquise Spina and Belcredi discuss the behavior of Henry IV. The doctor explains that crazy people have their own psychology: they can see that they are disguised, and at the same time believe like children for whom the game and reality are one and the same. But the marquise is convinced that Henry IV recognized her. And she explains the distrust and dislike that Henry IV felt for Belcredi, in that Belcredi is her lover. It seems to Marquise that the speech of Henry IV was full of regrets about him and her youth. She believes that it was misfortune that caused him to wear the mask that he wants, but cannot get rid of. Seeing the deep excitement of the marquise, Belcredi begins to be jealous. Frida is trying on a dress in which her mother portrayed Matilda Tuscany in a lush cavalcade.
Belcredi reminds those present that Henry IV should not “jump over” not the twenty years that have passed since the accident, but eight hundred separating the present from the era of Henry IV, and warns that this may end badly. Before playing the intended performance, the Marquise and the doctor are going to say goodbye to Henry IV and convince him that they left. Henry IV He is very afraid of the hostility of Matilda of Tuscany, an ally of Pope Gregory VII, so the Marquis asks to remind him that Matilda of Tuscany, along with Abbot Kluniysky, asked Pope Gregory VII for him. She was not at all so hostile to Henry IV, as it seemed, and during the cavalcade, Matilda Spina, who portrayed her, wanted to draw the attention of Henry IV to make it clear: although she taunts him, she is actually not indifferent to him. The doctor in the costume of Klunius Abbot and Matilda Spina in the costume of the Duchess of Adelaide say goodbye to Henry IV. Matilda Spina tells him that Matilda of Tuscany was fussing for him before the pope, that she was not an enemy, but a friend of Henry IV. Henry IV is thrilled. Seizing the moment, Matilda Spina asks Henry IV: “Do you still love her?” Henry IV is bewildered, but quickly controlling himself, reproaches the “Duchess of Adelaide” for betraying the interests of her daughter: instead of talking to him about his wife Berthe, she endlessly repeats him about another woman. Henry IV talks about the upcoming meeting with the pope, about his wife Berthe from Susie. When the marquise and the doctor leave, Henry IV turns to his four confidants, his face changes completely, and he calls the recent guests jesters. The young men are amazed. Henry IV says that he is fooling everyone, pretending to be crazy, and everyone in his presence becomes jesters. Henry IV is indignant: Matilda Spina dared to come to him with her lover, and at the same time she thinks that she showed compassion for the poor patient. It turns out that Henry IV knows the real names of the young men. He invites them to laugh together at those who believe that he is crazy. After all, those who do not consider themselves crazy are actually no more normal: today one thing seems to them true, tomorrow another, the day after tomorrow third. Henry IV knows that when he leaves, an electric light burns in the villa, But he pretends not to notice it. And now he wants to light his oil lamp, electric light blinds his eyes. He tells Arialdo, Aandolfo, Ordulfo and Bertoldo that they just played comedy in front of him, they had to create an illusion for themselves, to feel like people living in the 11th century, and watch from there how, after eight hundred years, people of the 20th century rush about captive of insoluble problems. But the game is over - now that the young men know the truth, Henry IV will no longer be able to continue his life in the image of the great king.
There is a knock on the back door: it came the old valet Giovanni, depicting a monk chronicler. Young men begin to laugh, but Henry IV stops them: it is not good to laugh at an old man who does this out of love for his master. Henry IV begins to dictate his life story to Giovanni.
Wishing everyone good night, Henry goes through the throne room to his bedchamber. In the throne room, in place of the portraits, exactly reproducing their poses, stand Frida in the costume of Matilda Tuscany and the Marquis di Nolly in the costume of Henry IV. Frida hails Henry IV; he shudders in fright. Frida becomes scared, and she starts screaming like crazy. Everyone in the villa is in a hurry to help her. No one pays attention to Henry IV. Belcredi tells Frida and the Marquis di Nolly that Henry IV recovered long ago and continued to play a role in order to laugh at them all: four young men had already managed to divulge his secret. Henry IV looks at everyone with indignation, he is looking for a way to take revenge. Suddenly, he had the idea of plunging into pretense again, since he had been so treacherously betrayed. He begins to speak to the Marquis di Nolly about his mother Agnes. The doctor believes that Henry IV fell into madness again, Belcredi screams that he began to play comedy again. Henry IV tells Belcredi that although he recovered, he did not forget anything. When he fell from the horse and hit his head, he really went crazy, and this went on for twelve years. During this time, his place in the heart of his beloved woman was taken by an opponent, things have changed, friends have changed. But then one fine day he seemed to wake up, and then felt that he could not return to his former life, that he would come "hungry, like a wolf, to a feast, when everything was already removed from the table."
Life has gone ahead. And the one who secretly pricked Henry IV's horse from behind, forcing her to stand on his hind legs and throw the rider, lived quietly all this time. (The Marquise Spina and the Marquis di Nolly are amazed: even they did not know that the fall of Henry IV from the horse was not accidental.) Henry IV says that he decided to remain insane in order to experience a special kind of pleasure: “relive your madness in an enlightened consciousness and take revenge on the rude the stone that broke his head. " Henry IV is angry that the young men talked about his recovery. “I have recovered, gentlemen, because I am perfectly able to portray a madman, and I do it calmly! It’s all the worse for you if you are so worried about your craziness without being aware, without seeing it, ”he says. He says that he did not participate in the life in which Matilda Spina and Belcredi were old, for him the marquise was forever like Frida. The masquerade that Frida was forced to play was by no means a joke for Henry IV; rather, it was just an ominous miracle: the portrait came to life, and Frida now belongs to him by right. Henry IV hugs her, laughing like crazy, but when they try to tear Freida out of his arms, he suddenly snatches a sword from Landolfo and wounds Belcredi, who did not believe that he is crazy, in the stomach. Belcredi is carried away, and soon from behind the curtains a loud cry of Matilda Spin is heard. Henry IV is shocked that his own invention has come to life, forcing him to commit a crime. He calls his associates - four young men, as if wishing to defend themselves: “We will stay here together, together ... and forever!”