Edward was led into the trial of Mary Read and Anne Bonny.
- Judge: The charges, sir. I'll hear them again.
- Official: Milord. His Majesty's Court contends that the defendants, Mary Read and Anne Bonny, did piratically, feloniously, and in an hostile manner, attack, engage, and take seven certain fishing boats... Secondly, this court contends that the defendants lurked upon the high seas and did set upon, shoot at, and take, two certain merchant sloops, thus putting the captains and their crews in corporeal fear of their lives.
- Rogers: Edward James Kenway. Born of motley parentage in Swansea... to an English father and Welsh mother. Married at eighteen to Miss Caroline Scott, now estranged.
- Torres: She is a beautiful woman, I'm told. But not at all well these days.
- Edward: If you touch her, you bastards, I'll—
- Torres: Quite a surprise finding you here, rotting in a Jamaican prison. We heard rumors that you had taken up with the pirate Roberts.
- Rogers: If you know the Observatory's location, tell us now and you'll be out of here in a flash.
- Torres: Rogers can hold these British hounds at bay for a time. But this will be your fate if you fail to cooperate.
- Judge: ...You, Mary Read and Anne Bonny, are to go from hence to the place from whence you came, and from thence to the place of execution, where you shall be severally hanged by the neck till you are severally dead, dead, dead.
- Anne: O rot!
- Judge: May God in his infinite mercy be merciful to each of your souls...
Mary and Anne interrupted the judge as they announced their pregnancies to the people of Kingston.
- Mary: We're pregnant! Do you all hear that?
- Judge: What the devil did she say?
- Official: They plead their bellies, Milord.
- Anne: Aye! You can't hang a woman quick with child, can ya?
The jury and the lawyers reacted in an uproar.
- Judge: Quiet! Quiet! If what you claim is true, then your executions will be stayed, but ONLY until your terms are up.
- Anne: Then I'll be up the duff the next time you come knocking!
- Judge: Remove them!
- Soldier 1: What's your name, pillock? Kenmore? Conway?
- Soldier 2: It's Walpole, ain't it?
- Soldier 1: Walpole? Where'd you get that?
- Soldier 2: That's the rumor going 'round. As dirty and daft a pirate as ever sailed these West Indies.
- Soldier 1: Well, whatever his name, you're to make sure he suffers without dying. Orders from the governor. And back to the prisons at sundown.
- Soldier 2: And massage his feet if he's aching, shall I?
- Soldier 3: Jaysus, a shit detail as ever was.
- Soldier 2: Can't they kill the bastard? Ain't been a good hanging in months, since Rackham got his.
- Soldier 3: Eh, hard to understand how it works. I've heard it said they scooped up Captain Vane near a year ago, and he's not seen the end of a rope.
- Soldier 2: I can't fathom it. Some men they stretch for days after capture. Others they sit on.
As Ah Tabai hid in the bushes, Edward rattled his cage to distract the guards.
- Edward: Oy!
Hey! Open this gibbet.
- Soldiers: Quiet!
Oy! You stop that!
Oy! Stop that.
Stop your twaddle!
This is a warning!
Ah Tabai assassinated the guards.
- Ah Tabai: Good morning, captain Kenway. I have a gift for you.
Ah Tabai took the cage key from one of the soldiers' bodies, and tossed it to Edward, who released himself.
- Ah Tabai: Do not mistake my purpose here. I have come for Anne and Mary, and you owe me nothing for this. But if you would lend me your aid, I can promise you safe passage from this place.
- Edward: I'll need weapons.
- Ah Tabai: You are comfortable with these, I am told...
- Ah Tabai: We must hurry.
- Soldier 4: Why 'aven't they killed that other one? Walpole, or some such idiot name.
- Soldier 5: Maybe he has friends looking out for him.
- Soldier 4: Or money. Like Stede Bonnet from Barbados.
- Soldier 5: Naw, naw. They hanged him too.
- Soldier 4: Did they?
- Soldier 5: Aye. Blubbering and bawling, he collapsed at the gallows. Weeping like a little lamb.
- Soldier 4: Serves the bastard right.
Edward found Jack Rackham's skeletal corpse in a gibbet.
- Edward: You weren't much of a friend, Jack Rackham. Nor an able sailor neither. But you were strange and lively, and you made me laugh more than once. And that's enough to make me sorry for seeing you like this. I hope you found a lasting peace, down there, among the dead.
Edward and Ah Tabai entered the prison complex, where they found a delirious Charles Vane in a cell.
- Vane: Here's a health to the king and a lasting peace / To faction an end, to wealth increase; / Come, let us drink it while we have breath, / For there's no drinking after death, / and he that will this health deny, down among the dead men, / Down among the dead men, / Down, down, down, down, / Down among the dead men let him lie.
- Edward: Hello, Vane. I caught wind you'd been discovered and brought here. Didn't hear what happened after though.
Vane shouted unintelligibly.
- Edward: Best of luck to you mate. I wish we'd parted as friends.
In a nearby cell, Anne Bonny shouted for help from the guards.
- Anne: You spineless cockrobin! Help her, for God's sake. Fetch help, somebody! Mary's ill! Somebody please!
- Soldier 6: Hush your pie hole, bloody mick!
- Anne: Fuck off, you! Ahoy! My friend's just had a child, and she's... and she's poorly now! Help, somebody!
- Soldier 7: Shut your bleeding trap, or I'll fill it my own way!
- Anne: (English) bastards! Murderers! Grown men, the pair of you, standing over a dying lady like she was a piece of meat!
- Soldier 6: A dying pirate! There's your difference!
- Soldier 7: Aye. If she dies from childbirth, all the better, eh? God carries out her sentence and our hands are clean.
- Anne: You bastards! Somebody help!
Edward and Ah Tabai dispatched the two guards.
- Edward: Mary? Mary, it's me! Edward!
- Anne: Edward? Who's this fella!
- Edward: It's all right, Anne. He's a friend. What's wrong with Mary?
- Anne: She's ill.
- Edward: And her child?
- Anne: They took her. No idea where. Ah!
- Ah Tabai: I know it pains, M'lady. But we must be silent.
- Edward: Can you walk? Lean on me, Mary. Come on.
- Mary: I can't...
- Soldier 8: Search every cell!
- Edward: Come on. That's it. You're all right.
- Mary: Stop! Stop. Please.
- Edward: I ain't leaving you, dammit! Lift your arm!
- Mary: It's no good.
- Soldier 9: There's no one here!
- Edward: I ain't leaving you nowhere! No bloody way!
- Mary: Put me down, Edward! Don't die on my account. Go.
- Edward: You're such a pain in the arse. Damn it, you should have been the one to outlast me.
- Mary: I've done my part. Will you?
- Edward: If you came with me, I could. Mary?
- Mary: I'll be with you, Kenway. I will.
Mary passed away and Edward carried her body outside.
- Soldier 8: Fan out! Search every nook and cranny!
Edward met with Ah Tabai and Anne Bonny.
- Anne: What's happened to Mary? What's wrong?
- Ah Tabai: Is she gone?
- Anne: Oh, no... Oh, God!
- Ah Tabai: What will you do now?
- Edward: Nothing sensible.
Ah Tabai returned Edward's robes to him.
- Ah Tabai: You haven't earned these, but they suit you. Good fortune to you, Edward Kenway.
Edward escaped captivity, along with Anne Bonny, but Mary Read died after childbirth.
- Even if Edward did not rattle his cage, Ah Tabai would still kill the guards and free him.
- It was possible to leave Mary's body behind, resulting in a slightly altered ending cutscene. 
- If players had Edward head in the opposite direction of Ah Tabai's boat immediately after being freed from the gibbet, a glitch could  occur where Edward would be able to free roam in Port Royal wearing his prison rags.