The Duke of Vienna asks a nobleman, Angelo, to assume leadership of the city and uphold the law while he—the Duke—is away traveling. He commands Angelo to uphold the law, and reveals that he plans to remain in the city in secret, disguised as a friar, to see how the city responds to what he expects will be Angelo's more strict upholding of the law.
Some time after the Duke's departure, Angelo imposes a death sentence on Claudio, who has impregnated his wife-to-be, Juliet, before their marriage. Lucio, a friend of Claudio's, relays this news to Isabella, Claudio's sister who has begun training to be a nun. Isabella's religious beliefs cause her to disapprove of Claudio's transgression, but Lucio persuades her to beg Angelo for clemency. She pleads her case in front of Angelo, who appears to grow gradually more sympathetic. He tells her to return tomorrow to hear his decision.
Afterwards, Angelo, who prides himself on his ice-cold demeanor and uncompromising restraint, is distressed to realize that he is enamored of Isabella. The next day, he offers her a bargain: if she will sleep with him, he will release her brother. Isabella is initially too naïve to understand Angelo’s insinuations; when Angelo asks her outright, she refuses, scandalized by the indecent proposition.
She visits Claudio in jail and reports this interaction to him, and he initially supports her decision to remain pure. However, Claudio changes his mind and begs his sister to take up Angelo’s offer. Isabella is offended by her brother’s request. However, the disguised Duke arrives and convinces her to orchestrate a liaison with Angelo: when the time comes to seduce Angelo, a woman named Mariana—a former fiancée of Angelo's whom he abandoned after she lost her brother and her dowry in a shipwreck—will take Isabella's place.
However, even after this encounter takes place, Angelo reneges on his word and orders Claudio's beheading. At the Duke's urging, the Provost who runs the jail deceives Angelo by sending him the head of a dead pirate, claiming it belonged to Claudio. The Duke sends a letter to Angelo announcing that he will soon return to Vienna. On his arrival, the Duke requests a public hearing before the city gates, where citizens can go to seek redress for injustices. When he reads this letter, Angelo nervously wonders whether Isabella will denounce him publicly, and regrets ordering Claudio’s execution out of a fear of retribution.
At the hearing, Isabella speaks out against Angelo, but the now-undisguised Duke pretends not to believe her. Mariana, too, tells her story, but the Duke remains unconvinced. The Duke then reappears in his friar costume, and Lucio accuses him of disrespecting the Duke. In an ensuing scuffle, the Duke’s disguise is removed. His masquerade revealed, the Duke carries out long-overdue justice. He forces Angelo to marry Mariana, and though he wishes to sentence him to death, Mariana and Isabella convince the Duke to spare Angelo. Claudio is permitted to marry Juliet, and Lucio is reprimanded and compelled to marry a prostitute who has borne him a child (and who he had refused to wed). Finally, the Duke asks Isabella to reconsider her monastic vows and marry him instead.