The Merchant of Venice opens with Antonio, a Christian merchant, in a depressed state. His friends try to cheer him up, but nothing works to make him feel better. Finally his friend Bassanio, an aristocrat who has lost all of his money, comes and asks Antonio to loan him some money.
Antonio, who has tied up all of his money is seafaring ventures, is unable to give Bassanio a direct loan. Instead he offers to use his good credit to get a loan for Bassanio. Bassanio finds Shylock, a Jewish moneylender, and convinces him to give a loan of three thousand ducats as long as Antonio will sign the contract. In a rather unusual twist, instead of charging the Christian men interest, Shylock agrees to waive it as long as Antonio promises him a pound of his flesh as collateral. Antonio, thinking this is a "merry sport," accepts the condition of the bond (contract) and signs it.
Bassanio takes the money and prepares to go visit Portia, a wealthy heiress living in Belmont. She is unmarried because her father has decreed that all suitors must first select one of three caskets in order to marry her. The caskets, one made of gold, one of silver, and one of base lead, all contain different messages. Only one of these caskets contains a picture of Portia. The suitor who picks that casket will be granted permission to marry her.
Prior to Bassanio's arrival the Prince of Morocco tries his luck in choosing among the caskets. He picks the gold casket because it contains an inscription reading "what every man desires." Instead of Portia's picture, he finds a skull which symbolizes the fact that gold hides corruption. As part of losing the suit, he is further sworn to never propose marriage to any other woman, and must return to Morocco immediately. The next suitor, the Prince of Aragon, selects the silver casket which bears an inscription stating that it will give a man what he deserves. Inside is a picture of an idiot, indicating that his self-centered approach was foolish. He too leaves in shame.
Back in Venice, Jessica, the daughter of Shylock, has fallen in love with Lorenzo. They plan to escape one night when Shylock is invited to eat at Bassanio's house. After Shylock leaves Lorenzo goes to his house with two friends. Jessica appears at a window dressed as a boy and tosses a chest of money and jewels down to them. She then emerges from the house and runs away with Lorenzo.
Shylock, upon discovering that his daughter has run away with a lot of his money, blames Antonio for helping her escape. At the same time there are rumors developing in Venice that many of Antonio's ships, with which he expected to repay Shylock for the loan, have sunk or been lost at sea. Shylock begins to revel in the news that Antonio is losing everything because he wants to exact his pound of flesh in revenge for the many insults Antonio has dealt him throughout the years.
Bassanio arrives in Belmont and meets Portia. She remembers him as the dashing soldier with whom she fell in love several years earlier. Portia begs Bassanio to wait before choosing among the caskets, but he demands the right to start immediately. Without even properly reading the inscriptions, Bassanio selects the lead one because he considers it a threatening casket. Portia is overjoyed when he finds her portrait inside. She gives him a ring to seal their engagement and they prepare to get married the next day. Graziano, who has accompanied Bassanio to Belmont, tells him that he and Nerissa (Portia's friend) wish to be married as well.
A messenger arrives and hands Bassanio a letter from Antonio in which he informs Bassanio that he has lost all his money and must forfeit a pound of flesh to Shylock. Bassanio immediately tells Portia what has happened. She orders him to take six thousand ducats and return to Venice where he can pay Shylock and cancel the contract. After Bassanio and Graziano have left, Nerissa and Portia depart for Venice disguised as men.
Shylock has Antonio arrested and brought before the Duke of Venice, who presides over a court of justice. The Duke pleads with Shylock to forgive the contract and let Antonio go free. When he refuses, the Duke asks him how he expects any mercy if he is unable to offer it. The Duke then tells the gathered men that he is waiting for a doctor of the law to arrive.
Nerissa enters the court and hands a letter to the Duke which notifies him that a Doctor Bellario has sent an educated young doctor in his place. Portia arrives disguised as the Doctor Balthasar. She informs the Duke that she has studied the case and will preside over it. She first asks Shylock for the contract and looks it over. Bassanio offers to pay Shylock the six thousand ducats, but he refuses to accept the money, preferring instead the revenge of killing Antonio. Unable to find any loopholes, Portia grants Shylock his pound of flesh. Shylock, overjoyed at winning his case, holds a knife ready to cut into Antonio's breast.
Portia stops him by asking if he has a surgeon present to suppress the flow of blood. Shylock tells her that the bond said nothing about providing a doctor. She informs him that he may have his pound of flesh, but that if he sheds a single drop of blood then Venice can take away his lands and wealth according to the law. Shylock, clearly unable to comply with this law, asks instead that he be given the six thousand ducats. Portia refuses his request, explaining that she has already ruled according to the contract, and that it must be carried out.
Portia then starts to read the contract literally, reaffirming that Shylock must take exactly one pound of flesh, no more and no less, or he will violate the contract and die. Shylock tells the court that he wishes to completely drop his case and forgive Antonio the entire three thousand ducats. Portia again refuses his request, explaining that the law in Venice states that if any foreigner conspires against the life of a Venetian, half his wealth is to be given to the man against whom he conspired, and half is taken as a fine by the state. In addition, the Duke is granted the power of life and death over him.
When Shylock is pardoned by the Duke, he informs the court that he would prefer death rather than lose everything he owns. Antonio asks the court to return the fine of half of Shylock's wealth provided Shylock converts to Christianity. In addition, Antonio declares he will keep his share in a trust for Jessica and Lorenzo. Portia agrees to this, and also makes Shylock promise to give all his money to Lorenzo upon his death.
After the trial Bassanio thanks "Dr. Balthasar" (Portia) for "his" good work and offers "him" anything "he" desires. Portia asks him for the ring she had given him earlier as a token of their love. He is upset about giving it to her since he thinks she is "Balthasar." However, after Antonio points out that he nearly lost his life for Bassanio, Bassanio pulls off the ring and hands it to her.
Portia and Nerissa return to Belmont dressed normally. Lorenzo and Jessica have been living there, enjoying the comfortable life Belmont offers. Soon after the two women arrive, Bassanio and Graziano also return from Venice. The happy reunion is destroyed when Portia asks Bassanio about the ring (which he gave away). She forgives him only after Antonio vouches for Bassanio's fidelity.
Portia then gives Antonio the ring and has him hand it to Bassanio. He is shocked to see it is the same ring he gave "Balthasar". Portia finally tells him the truth about Balthasar. The play ends with three happy couples: namely Lorenzo and Jessica, Nerissa and Graziano, as well as Portia and Bassanio. However, Antonio and Shylock remain outcasts, separated from the happy ending.