Bassanio, a young Venetian, would like to travel to Belmont to woo the beautiful and wealthy heiress Portia. He approaches his friend Antonio, a merchant, for three thousand ducats needed to subsidize his traveling expenditures as a suitor for three months. As all of Antonio's ships and merchandise are well laden and homeward bound, he confidently promises to cover a bond, so Bassanio turns to the moneylender/usurer Shylock.
Shylock, who hates Antonio because he had insulted and spat on him for being a Jew a week previously, proposes a condition. If Antonio is unable to repay the loan at the specified date, Shylock will be free to take a pound of Antonio's flesh. Although Bassanio does not want Antonio to accept such a risky condition, Antonio, surprised by what he sees as the moneylender's generosity (no "usance" — interest — is asked for), accedes and signs the contract. With money at hand, Bassanio leaves for Belmont with another friend Gratiano.
In Belmont, Portia is awash with suitors. Her father has left a will stipulating each of her suitors must choose correctly from one of three caskets – one each of gold, silver, and lead – before he could win Portia's hand. In order to be granted an opportunity to marry Portia, each suitor must agree in advance to live out his life as a bachelor if he loses the contest. The suitor who correctly looks past the outward appearance of the caskets will find Portia's portrait inside and win her hand.
After two suitors, choose incorrectly (the Princes of Morocco and Aragon) Bassanio chooses the leaden casket. He gets it right. The other two contain mocking verses, including the famous phrase all that glisters [glistens] is not gold.
At Venice, all ships bearing Antonio's goods are reported lost at sea, leaving him unable to satisfy the bond. Shylock is even more determined to exact revenge from Christians after his daughter Jessica flees his home to convert to Christianity and elope with the Christian Lorenzo, taking a substantial amount of Shylock's wealth with her. With the bond at hand, Shylock has Antonio arrested and brought before court.
At Belmont, Portia and Bassanio have just been married, along with his friend Gratiano and Portia's handmaid Nerissa. He receives a letter telling him that Antonio has defaulted on his loan from Shylock. Shocked, Bassanio and Gratiano leave for Venice immediately, with money from Portia, to save Antonio's life. Unknown to Bassanio and Gratiano, Portia and Nerissa leave Belmont to seek the counsel of Portia's cousin, Bellario, a lawyer, at Padua.
The dramatic center of the play comes in the court of the Duke of Venice. Shylock refuses Bassanio's offer, despite Bassanio increasing the repayment to 6000 ducats (twice the specified loan). He demands the pound of flesh from Antonio. The Duke, wishing to save Antonio but unwilling to set a dangerous legal precedent of nullifying a contract, refers the case to Balthasar, a young male "doctor of the law" who is actually Portia in disguise, with "his" lawyer's clerk, who is Nerissa in disguise. Portia asks Shylock to show mercy in a famous speech (The quality of mercy is not strained—IV,i,185), but Shylock refuses. Thus the court allows Shylock to extract the pound of flesh.
At the very moment Shylock is about to cut Antonio with his knife, Portia points out a flaw in the contract. The bond only allows Shylock to remove the flesh, not blood, of Antonio. If Shylock were to shed any drop of Antonio's blood in doing so, his "lands and goods" will be forfeited under Venetian laws.
Defeated, Shylock accedes to accept monetary payment for the defaulted bond, but is denied. Portia pronounces none should be given, and for his attempt to take the life of a citizen, Shylock's property will be forfeited, half to the government and half to Antonio, and his life will be at the mercy of the Duke. The Duke pardons his life before Shylock can beg for it, and Antonio asks for his share "in use" (that is, reserving the principal amount while taking only the income) until Shylock's death, when the principal will be given to Lorenzo and Jessica. At Antonio's request, the Duke grants remission of the state's half of forfeiture, but in return, Shylock is forced to convert to Christianity and to make a will (or "deed of gift") bequeathing his entire estate to Lorenzo and Jessica (IV,i).
Bassanio does not recognize his disguised wife, but offers to give a present to the supposed lawyer. First she declines, but after he insists, Portia requests his ring and his gloves. He gives the gloves away without a second thought, but gives the ring only after much persuasion from Antonio, as earlier in the play he promised his wife never to lose, sell or give it away. Nerissa, as the lawyer's clerk, also succeeds in retrieving her ring from Gratiano.
At Belmont, Portia and Nerissa taunt their husbands before revealing they were really the lawyer and his clerk in disguise.
After all the other characters make amends, all ends happily (except for Shylock) as Antonio learns that three of his ships were not stranded and have returned safely after all.