Merciless Secrets
At this point in the play we have our two adversarial qualities in neat, separate containers. One container, called The Duke, is only merciful. But this container must be removed from the state so the other, called Angelo, can display its contents of merciless justice.
But, as this is Shakespeare, things quickly begin to get messy. Angelo turns out to be hiding secrets. The old Lord, having hinted that the Duke is over-merciful, now suggests that Angelo is being a bit hard on Claudio. He cautiously suggests that, had time and place given opportunity, Angelo himself might have come to the wrong side of the law. Angelo's response says more, perhaps, than he means to:
"What's open made to justice,/ That justice seizes."
Justice only deals with what it can see, in other words. We pick up a jewel on the ground only when it catches the light; buried or soiled, we walk right past it or even trample it.
This is our first hint of Shakespeare's subversion of the polarized containers. Listening to Antonio's speech, we've begun to wonder if, lacking the slightest trace of mercy, justice doesn't in fact begin to look a little unfair.
And then we see Angelo acting on his theory. Claudio's sister comes to him to beg for her brother's life. Angelo is quickly captivated by her beauty, and soon offers her a deal. If she will meet him for sex in the garden—secretly of course, so that the crime cannot be "unjust"— he will let Claudio free.
This offer obviously shows the rot in his theory of justice, as he is forming a contract, a just bond, around blackmail and rape. But it also ruins mercy, since his proposed pardon of Claudio is not merciful at all, but simply the meeting one end of a "just" bargain.
The Kiss
Our neat containers have nearly dissolved around their contents. "Mercy is not mercy that oft looks so," but justice is not justice that only looks so. Justice as merciless as Angelo's turns out to be unjust, in the same way that mercy without justice turns up bereft of mercy. This is why the Duke left, and it's why Angelo fails as his deputy.
But the Duke has returned, and now we begin to see what his secret purposes are. He goes to visit Claudio for confession and counsel, and also goes to Claudio's sister for comfort and advice. Here is one of the delightful places where Shakespeare plays with religious stereotypes. The "controversy" of grace that I mentioned above, is for Shakespeare's audience an all-too familiar one, over whether God saves us through our works, and so through a contractual justice, or through grace, which is to say through an act of unearned mercy. The Catholic Church was generally (though not often accurately) associated with the former, the Protestants with the latter. But here it's a Catholic friar (or at least a disguised one!) who enters as the personified mercy.
The Duke/friar devises a plan, and it nearly goes as awry as the more famous friar's plan in Romeo and Juliet. Which is to say that our comedy nearly becomes a tragedy. I won't give away the ending, if you've forgotten or never made it through. But I'll offer a hint: the Duke, on his return, is no longer an embodiment of unjust mercy as he was before. Now he sees clearly that true mercy is just, and true justice is mercy. The two must kiss, as the Psalm puts it. His clever idea for a resolution is all about allowing mercy and justice to exchange a kiss.
When Mercy Seasons Justice
The more familiar play in which Shakespeare lets us watch the battle of justice and mercy is The Merchant of Venice. Here we find the story of maybe the strangest contract made since the dawn of commerce: if a merchant defaults on his loan, the moneylender will claim an entitlement to "a pound of flesh." Is this mutually agreed-upon contract unjust, or simply merciless?
The religious fun is rampant in this play as well. The lender is a Jew and the merchant is a Christian. But the Jew's strict call for commercial exactitude gets tempered by his excessive love for his daughter, and the Christian's supposed reputation for grace is in fact an excuse to practice favoritism. Eventually we have on stage such a confusion of religious stereotypes that someone asks which character is which.
Well, the poor merchant can't pay, as we knew already at the moment he made the foolish contract. And so, Portia, this play's mercy persona, comes—also in disguise—from the fairytale land of Belmont with a clever trick to save her beloved merchant. While her solution involves a highly questionable interpretation of the law, she manages to persuade the ruling authority.
As Portia is making her case, she offers one of the most explicitly theological speeches in all of Shakespeare's works. Earth's rulers might think they are most godlike when they enact the law with authority, she says. But "mercy is above this sceptered sway." In fact, mercy is "an attribute of God himself." She concludes, much as the Duke concludes, that "earthly power doth then show likest God's/ When mercy seasons justice."