Flying high over an unknown mountain range with her servant, Clarín, Rosaura’s hippogriff unexpectedly lands. Rosaura, wearing men’s clothing, steps off the winged beast and has no idea where she is. She is full of heartbreak and despair, yet she knows that fate has brought her to this strange place. Rosaura remarks that Poland has not been kind to her thus far, and she notices a rustic building up a wooded path. There is light pouring from an open door, and Rosaura and Clarín can hear the rattle of chains and sad lamentations coming from within. As they move closer, Rosaura is struck with deep sympathy for the crying man, and they stop outside to listen. The man, dressed in animal skins “like a wild beast,” claims that his only crime is having been born, which everyone is surely guilty of. Still, the man, whose name is Segismundo has less liberty than any man or animal, and his only contact with the outside world is his jailer, Clotaldo.
Suddenly, Segismundo becomes aware of Rosaura and Clarín’s presence and demands to know who is there. He grabs a frightened Rosaura and threatens to kill her, but when she explains she is only an unfortunate soul looking for consolation, Segismundo begins to soften. The sound of Clotaldo and a group of guards comes from deep inside the prison, and they hear Clotaldo order the guards to kill the intruders at once. As Clotaldo and the guards approach, Rosaura and Clarín beg for their lives and surrender their weapons as directed. When Rosaura hands over her sword, Clotaldo immediately recognizes it. He had left the very same sword with Violante, the mother of his unborn son, in Muscovy, so that the boy might later use it to find his father. Realizing that Rosaura, whom Clotaldo believes is a man, is actually his son, Clotaldo knows he cannot kill them—even if that means King Basilio will order Clotaldo’s own death for disobeying his order to kill anyone trespassing at the secret prison. Leaving Segismundo locked and shackled in his cell, Clotaldo brings the two strangers to the palace in Warsaw.
Back at the palace, Astolfo watches as his cousin Estrella enters with her ladies-in-waiting. Astolfo and Estrella are the nephew and niece of King Basilio (their mothers had been his sisters), and since the king has not fathered a living heir, they are both vying for the crown. Astolfo, thinking that it might be most advantageous to marry Estrella, flatters her beauty, claiming she is “queen in [his] soul.” Estrella, however, isn’t impressed with Astolfo’s efforts to flatter her and considers him full of “deceit and treachery.” As trumpets sound the arrival of King Basilio, Estrella points to the pendant hanging from Astolfo’s neck, which, she insists, contains the portrait of another woman. Basilio enters and lavishes his niece and nephew with love, and while he promises to treat them equally in their desires for the crown, he says he must first make a confession.
The king claims that his late wife had given birth to a son, Segismundo, whose astrological prophecy claimed he would be a tyrant who would murder his father and cause dissent and division within Poland. In an effort to save his country and his life, Basilio immediately locked Segismundo up after birth, “to see whether a wise man / can prevail over the stars.” Now, however, Basilio questions his decision to imprison his son and deny Poland of their rightful prince, and he has decided to free Segismundo on a trial basis. Basilio believes that perhaps Segismundo’s evil nature won’t surface, or that he will be able to resist his violent tendencies through his own free will. Moments later, after Astolfo and Estrella exit, Clotaldo arrives at the palace with Rosaura and Clarín and asks to speak with the king. He begins to explain to Basilio that he did not kill the strangers whom he found trespassing at the secret prison, but Basilio cuts him off. He has already revealed the secret, Basilio says, so there is no need to kill the strangers. Clotaldo is relieved; now he won’t have to tell Basilio that the stranger is his son.
Sometime later, Clotaldo enters the castle and informs Basilio that his orders have been followed. Clotaldo has given Segismundo a potion made of opium, poppy, and henbane, and, after he fell into a deep sleep resembling death, brought him to the palace and placed him in Basilio’s luxurious bed. Now, Clotaldo says, he demands to know why Basilio has requested Segismundo’s presence—and in such a state—after all these years. Basilio claims that he wishes to discover if he can change the stars, so to speak. Or, at least, see if the prophecy was wrong. He wants to know if Segismundo can overcome his evil nature. If not, he will send him back to prison at once. The point of bringing Segismundo to the palace in his sleep is so they can convince him the experience was just a dream, should the prophecy prove true and they have to send him back to prison. If that happens, Basilio says, then Segismundo’s imprisonment will be punishment and not merely precaution. As they hear a very confused Segismundo approaching, Basilio orders Clotaldo to tell Segismundo that he is the prince of Poland, and then he slips out of the room.
Segismundo enters. He knows that he is awake, yet he still feels as if he is dreaming. Clotaldo immediately asks if he can kiss Segismundo’s hand, and Segismundo is even more confused. Why, he asks, should his jailer, who normally treats him poorly, now want to kiss his hand? Clotaldo explains that Segismundo is actually the crown prince of Poland and has been imprisoned all this time because a prophecy claimed he would bring only pain and ruin to his people. Segismundo is incensed. How could Clotaldo treat his prince so badly? Segismundo threatens to kill Clotaldo with his bare hands and throws a servant from the balcony. Clotaldo begs Segismundo to behave and tells him that he is only dreaming, but Segismundo can’t be calmed. Astolfo enters and saves Clotaldo’s life, and Segismundo challenges him to a duel. King Basilio arrives to investigate the commotion, and Segismundo verbally attacks him for locking him in the secret prison. He calls his father a “tyrant” who has robbed him of his liberty and freedom, and Basilio, too, tells Segismundo that he is only dreaming.
Meanwhile, Estrella approaches Rosaura—whom she knows as Astraea, her lady-in-waiting—and asks her to retrieve the pendant from Astolfo. Estrella doesn’t intend on ever speaking to Astolfo again, but she refuses to let him keep the portrait. As Estrella leaves, Rosaura is distraught. Clotaldo, who now knows that Rosaura is his daughter, has advised her not to reveal her true identity. Suddenly, Astolfo enters and recognizes Rosaura as the woman he had fallen in love with in Muscovy. She tells him that her name is Astraea and demands he give her the portrait, so she may in turn give it to Estrella. Astolfo refuses and tells Rosaura that the portrait in question is of her. Estrella enters, and Rosaura quickly lies and tells her that the portrait in Astolfo’s hand is her own. She had brought along her own, Rosaura claims, and when she stopped to look at it, Astolfo took it and now refuses to return it. Estrella takes the portrait, and, agreeing that it is certainly Astraea’s portrait, demands to see the portrait from the pendant. Astolfo again refuses. “Damn you, Rosaura!” he exclaims, just as Segismundo, sound asleep and dressed in animal skins, is carried through the room.
Back at the secret prison, a peasant uprising storms Segismundo’s cell to free their rightful prince. They won’t accept a foreign king, they claim, and they plan to revolt. Segismundo again assumes he is dreaming, but he plays along anyway and decides to prove the prophecy true. He will fight his father and claim his rightful place on the throne. When Clotaldo realizes that Segismundo has been freed from his cell, he throws himself at his feet and begs for mercy. Segismundo, however, thanks Clotaldo for taking care of him over the years and spares his life. He pledges his loyalty to Clotaldo and says that good deeds, even in dreams, are never wasted. Clotaldo thanks Segismundo for his kindness but says he cannot take up arms against the king, to whom he has sworn his own loyalty. Segismundo understands, and he lets Clotaldo go, promising to see him on the battlefield.
At the palace in Warsaw, Rosaura begs Clotaldo to help her seek revenge on Astolfo. It is Clotaldo’s duty as her father, Rosaura says, to defend her honor. Astolfo stole Rosaura’s honor back in Muscovy and left her to come to Poland and marry Estrella, and the only way to right the wrong is to kill him. Clotaldo refuses. Astolfo saved his life when Segismundo wanted to kill him, and he can’t possibly kill Astolfo now, regardless of his ill-treatment of Rosaura. She is furious and curses Clotaldo as her father.
Clotaldo and Rosaura exit, and Segismundo, accompanied by his armed men, enters. Suddenly, Rosaura enters again, this time dressed in a long tunic and carrying her sword. She pledges her loyalty to Segismundo and explains again how Astolfo has stolen her honor. She implores Segismundo to help her avenge her lost honor, but Segismundo doesn’t answer. Rosaura is angry that Segismundo is ignoring her, but he assures her that he will avenge her honor through actions, not words. The sound of drums indicates that Segismundo’s men have taken the castle, and Clotaldo and Basilio enter, surrendering to Segismundo. As Basilio bows at his son’s feet, Segismundo tells him to rise. He will honor him after all, Segismundo says, and accepts him as his father and king. Basilio is impressed with Segismundo’s good nature and, since Segismundo has effectively proved the prophecy wrong, Basilio immediately makes Segismundo king. As his first order of business, Segismundo commands Astolfo to marry Rosaura and restore her lost honor, and then he claims Estrella as his own queen. Segismundo is finally happy, yet he worries he will wake in his prison cell. Even so, Segismundo decides, to wake in prison after this joyous day will be enough, as all “human happiness / passes by in the end like a dream.”