Lorenzo and Jessica are still at Belmont gazing at the night sky. They list off a bunch of things (from Greek mythology) that happened on nights like this, including Troilus weeping over Cressida, Thisby running away from a lion, Dido waiting for her lover, Medea gathering herbs for Jason, and, in one twisted love story, Jessica running away from her father to Lorenzo. Jessica teases that Lorenzo swore his love for her but was full of lies, and Lorenzo jokes that she is slandering their love, but he forgives her for it.
They're interrupted by the approach of a messenger, who says that Portia is on her way home to Belmont that night. Oddly, she keeps stopping to pray along the roadside at holy crosses. Jessica and Lorenzo declare they should hastily prepare some good cheer (read: booze) to welcome Portia home.
They're interrupted when Lancelot enters the scene and plays at his usual idiocy.
The clown finally tells Lorenzo that he's gotten a message announcing that Bassanio will be home before morning.
Lorenzo and Jessica hang out, listening to music and stargazing.
Lorenzo says he really should rush inside and prepare, but instead he elects to stay outside and listen to some music. He speaks sweetly to Jessica, declaring that they hear the music over the sound of the slow decaying of their lives.
Lorenzo and Jessica speak some more about the power of music, but the scene shifts to Portia and Nerissa, who are also philosophizing about music. Portia sees a candle in her house and marvels at how far its little light shines.
The two women then discuss some philosophical thoughts, like how a candle is bright until you compare it to the moon; and how music, seeming sweet during the day, is even sweeter at night when everything's quiet and you can hear it better. (These are two separate thoughts: the first is that comparisons are needed to understand an object's worth, and the second is that context has a lot to do with judgment.)
Lorenzo then hears Portia's voice and they all greet each other. Portia quickly reminds everyone that she and Nerissa were off praying for their husbands' wellbeing. Hearing from Lorenzo that the two men are on their way home that same night, Portia tells Nerissa to make sure all the servants make no mention of her and Nerissa's absence. She instructs Lorenzo and Jessica to do the same. Just then, we hear the trumpet announcing Bassanio's approach, and Lorenzo promises that his and Jessica's lips are sealed.
Bassanio then enters with Antonio, Graziano, and others in tow. There's much ado as Bassanio introduces Antonio to Portia, who welcomes him graciously. On the side, Graziano can be heard having a little squabble with Nerissa. He insists he gave "it" (her ring) away to the judge's clerk (and thus not a woman). Graziano says he hopes the judge's clerk is gelded (castrated) like a horse since Nerissa is so bothered by his decision to give the ring away.
Portia turns her attention to their quarrel, and Graziano says Nerissa's only fussing about a little ring. Nerissa, of course, points out that the ring isn't the issue – it's that Graziano had sworn to take the ring to his grave. (We're sensing a theme here about oaths and promises and the like.) Even if he didn't care about her, at least he should have respected his oath.
Graziano, however, keeps insisting that he gave the ring to the young boy who begged for it as a fee for his service.
Portia backs up Nerissa, pointing out that she also gave her husband a ring on the same promise that he'd keep it forever, and of course he wouldn't ever, ever think of giving it away, right?
Poor Bassanio, naturally, is sweating in his boots. But he has a bright idea. Maybe if he cuts off his left hand and swears he lost it defending the ring, then he will be in the clear.
Speedily, Portia says she won't "come in [Bassanio's] bed" until she sees the ring. (But she has the ring.) Nerissa makes the same threat to Graziano. Bassanio tries to cover his bottom, saying Portia would be more forgiving if she knew the circumstances under which he gave the ring away.
Portia responds that if he had known how worthy she was, he wouldn't have given it away at all.
There's some squabbling about whether the ring was given to a woman, and Bassanio tries to explain the whole thing: the 3,000 ducats, the civil doctor (lawyer), the seeming ungratefulness, etc.
Portia then says if the doctor ever comes around her house, she'll come around his house – if you gather our drift.
Nerissa chimes in that she'd sleep with the doctor's clerk, but Graziano is not OK with that.
Antonio cuts off all the quarrelling. Having just barely escaped Shylock's knife, he's ready to risk his life again as a guarantee that Bassanio will, from this moment on, be faithful to Portia. Portia, hearing this, hands Antonio her ring to give to Bassanio, who must swear to keep it.
Bassanio is shocked to get the same ring back, saying something like "Wow! I gave this to the doctor!"
Then Portia's all "Awesome! I slept with the doctor!" Nerissa hands her ring back to Graziano, too, adding casually that she slept with the doctor's clerk.
While Graziano laments that he's been made a cuckold (a husband who's been cheated on) before he even deserved it, Portia clears everything up. She hands over another letter from the mysterious Doctor Bellario, who has written that Portia was the doctor at Shylock's trial and Nerissa the clerk. Further, Portia has somehow gotten a letter for Antonio announcing that three of his ships randomly have made it safely (and richly) to harbor.
Antonio says "I am dumb" (speechless).
Then everyone makes up. Bassanio says the doctor can sleep with his wife anytime, since the doctor is his wife. Antonio praises Portia for "giving him his life and living." And Nerissa gives Lorenzo the good news that he and Jessica will get all of Shylock's inheritance.
Portia adds that she'll explain everything further once they've all settled in. Graziano closes the play wondering, since it's so close to morning, whether he can sleep with Nerissa now or whether he has to wait until tomorrow night.