A wealthy young Spaniard named Alsemero is visiting Alicante, a city in the Spanish province of Valencia. Near the end of his stay, Alsemero spots the beautiful noblewoman Beatrice Joanna and instantly falls in love with her. Desperate to spend more time with Beatrice, Alsemero cancels his planned trading voyage, surprising his friend Jasperino.
Alsemero courts Beatrice, though she urges caution, warning him that “eyes are rash sometimes, and tell us wonders of common things.” Beatrice also tells Alsemero some bad news: just five days ago, her father Vermandero arranged for her to marry Alonzo de Piracquo, a prominent nobleman. Beatrice does not want to marry Alonzo, so she convinces Alsemero to extend his stay in the hopes that she can avoid her wedding. As Beatrice schemes, Jasperino crudely flirts with Diaphanta, Beatrice’s lady-in-waiting.
Vermandero’s most trusted servant DeFlores arrives, and Beatrice is cruel to him; she explains to Alsemero that she instinctively loathes DeFlores for his ugly appearance and submissive mannerisms. While Vermandero invites Alsemero back to his palace in a show of hospitality, DeFlores reveals in an aside that he is in love with Beatrice, despite her mockery.
Across town at the local madhouse, doctor Alibius has a problem: he is worried someone is going to seduce his much-younger wife Isabella. Alibius enlists his assistant Lollio to lock Isabella away, ensuring that she does not interact with any of the madhouse’s visitors. Lollio and Alibius comically welcome a new patient named Antonio, a fool who comes from noble birth.
Back at the castle, Alonzo de Piracquo has arrived for the wedding, with his brother Tomazo in tow. Though Alonzo is excited about his new bride, Tomazo notices that Beatrice seems deeply unenthused about her husband-to-be. Meanwhile, DeFlores is growing more and more determined to have sex with Beatrice one way or another.
Privately, Beatrice decides she will manipulate DeFlores into killing Alonzo. The next time Beatrice sees DeFlores, she flirts with him, and he vows to do anything she might ask. When Beatrice explains that she wants DeFlores to murder Alonzo so that she can be with Alsemero, DeFlores instantly agrees. DeFlores then brings Alonzo on a tour of the castle, stabbing him to death with a rapier. When DeFlores notices a diamond ring on Alonzo’s finger, he cuts the finger off, hoping to give the ring to Beatrice.
Meanwhile, Isabella is increasingly annoyed about being locked in the madhouse. A new patient named Franciscus arrives, displaying violent tendencies. When Lollio goes off to deal with Franciscus, Antonio approaches Isabella and reveals that he is not actually a fool—he has merely been pretending to be one to get access to Isabella. From afar, Lollio sees Antonio declare his love. Lollio re-enters and sends Antonio away—and then tries to force himself on Isabella, just as Antonio did moments before.
In the nick of time, Alibius returns from a visit to Vermandero’s castle. He informs Lollio that Vermandero wants the fools and madmen to dance at Beatrice’s upcoming wedding. Isabella finds this distasteful, as she does not think the patients should be treated as a “commodity.”
DeFlores informs Beatrice that he has killed Alonzo, presenting her with the diamond ring and severed finger. Beatrice tells DeFlores to keep the ring as part of his payment, alongside 3,000 gold florins. But though DeFlores needs the cash, he is horrified that Beatrice sees him as someone who would kill simply for money. Instead, the only thing DeFlores wants is to be the person Beatrice loses her virginity to. At first, Beatrice refuses. But when DeFlores reminds her just how much their murderous conspiracy has linked them forever, Beatrice relents, and the two go off to have sex.
A dumb show (montage) shows Vermandero learning of Alonzo’s disappearance. Now that Alonzo is gone, Vermandero allows Beatrice and Alsemero to marry.
But Beatrice’s struggles are not over yet, as she discovers that Alsemero has prepared a potion (labeled ‘M’ for maid) to determine whether she is actually a virgin. Since Beatrice did have sex with DeFlores, she knows she will not be a virgin on her wedding night. So Beatrice forms a plan: she will send Diaphanta, disguised as herself, to have sex with Alsemero. To make sure that Diaphanta is actually a virgin, Beatrice tests her with the potion, and Diaphanta has the predicted reaction for a “maid”: she gapes, sneezes, laughs, and then becomes sad. Beatrice vows to pay Diaphanta handsomely for this trick.
Meanwhile, Tomazo is still desperate to know who killed his brother; he suspects Alsemero, while Vermandero believes that Antonio and Franciscus—who have recently gone missing from the palace—are at fault. Worse still, Jasperino reveals to Alsemero that he overheard Beatrice and DeFlores flirting. Alsemero is overcome with jealousy, so he tests Beatrice with the “M” potion. Fortunately, Beatrice is able to mimic Diaphanta’s reaction from earlier that day, convincing Alsemero of her innocence.
Back at the madhouse, Franciscus, too, comes on to Isabella; like Antonio, he reveals that he has only been pretending to be mad so as to get closer to her. Isabella laments her fate and decides to herself dress up as a madwoman to teach Antonio a lesson. Antonio rejects Isabella when she is in disguise, prompting her to assert that Antonio never really loved her at all. Not wanting the fun to end, Lollio schemes to pit Franciscus and Antonio against each other.
It’s now the middle of the night, and Beatrice is pacing the floors of the castle, waiting for Diaphanta to finish her tryst with Alsemero. When DeFlores sees how anxious Beatrice is, he offers to start a fire in the castle, causing chaos and forcing Diaphanta and Alsemero to separate. Beatrice now finds herself truly attracted to DeFlores. After the fire breaks out, DeFlores creeps off and shoots Diaphanta, thereby eliminating the source of Beatrice’s newfound jealousy.
While Isabella, Vermandero, and Alibius work to bring Antonio and Franciscus to justice, Alsemero continues to suspect Beatrice of infidelity. Eventually, she confesses to murder and adultery, implicating DeFlores in her crimes. Alsemero locks the two conspirators away, and DeFlores make one final pass at Beatrice. The rest of the characters arrive on the scene, and Alsemero reveals Beatrice and DeFlores’s guilt to all. DeFlores kills himself, feeling that he has fulfilled his life’s purpose by having sex with Beatrice; Beatrice follows suit, not wanting to live to see her punishment.
Isabella, shocked at the scandal around her, begs Alibius for more patience and trust. Vermandero blames himself for not having seen such cruelty and manipulation in either his daughter or DeFlores, but Alsemero assures him that some things are impossible to predict. In an epilogue, Alsemero testifies to the importance of family and forgiveness.