In the kingdom, the lemurs are panicking about the unblessed mango harvest. Maurice pleads Julien's parents to do something. Julienne rings her bell to calm the lemurs down, and suggests that a lemur sacrifice will appease Gladys. The lemurs say Ted will be the sacrifice because Mort isn't there and he's number two on the official sacrifice list. Ted runs away with lemurs chasing him. Julien's parents follow suit, making Maurice carry their weapons.
On the pirate ship, Ethan is waiting for Julien to walk the plank. Julien shouts for help from Sage, but Sage doesn't get remember their signal. Furious with Sage, Julien walks towards and tells him to call his hawk. Sage calls his hawk, but he only rescues Sage. Ethan comments about how fun this was, but tells Julien it's time to walk the plank.
On the S.S. Peepee Pants, Clover and Mort are sinking fast. Clover tells Mort to take the bloomer sail, so he can plug the leak. She ties him up and throws him off the ship to plug it.
Back on the pirate ship, Julien tries to convince the pirates to recruit him as one of their own by dancing, and telling them how much booty they'll have with him alive. Ethan is convinced by the promise of lots of booty (treasure) and that he doesn't need to give him trophies if he joins.
Back on the S.S. Peepee Pants, Mort goes up the back of the toilet and successfully plugs the leak with the bloomers. Clover pulls him back out and uses him as a paddle to move the ship.
Back on the pirate ship, Julien leads the crew on a raid. The pirates run past the Crocodile Kingdom, Crimson's house, the skull cave, and back onto the pirate ship. Ethan comments that the raid was unique, and asks to see what booty they got. The crew looks nervous and Ethan complains that they did not get any loot, yet they still ask for trophies. Julien jokes about Ethan getting up on the wrong side of the poop deck, earning laughter from Little Arms and One-Eye. When Ethan calls Julien out, Julien says it can't be that hard to be captain. Ethan, insulted, dares Julien to be the captain. Julien compliments himself on his thinking, and tells the crew he has to get home, but decides to do a little pirate captaining instead.
Back in the kingdom, while Ted is hiding from the other lemurs, Dorothy spots him and gives him a sandwich, scolding him that he shouldn't have put his name on the list. Some lemurs come back and ask who Dorothy is talking too. Dorothy leads the lemurs the opposite way, and gives Ted a kiss. Ted tells her he loves her. Behind Ted is Barty and Julienne, planning to spear him. Ted notices them when Maurice coughs loudly to give them away, just before they can spear him.
On the shore, Clover has managed to bring the boat ashore to fix it. She fixes the ship herself, and she notices beside her some footprints. Recognizing them as Julien's. Mort confirms this by eagerly tasting them. When the two question the other footprints, some rats relaxing on the beach say they were pirates'. Mort, upon hearing that there are pirates, says he knows where they live and thinks Julien is there.
Back on the Bonnie Bonnie, Julien sings a song with the pirates about what pirates actually do.
On the S. S. Peepee Pants, Clover and Mort find the pirates with King Julien. Mort suggests the best way to deal with them, a full frontal attack that is hard and fast. Clover agrees. The pirates spot the ship, and the crew ask Julien what to do. Julien, noticing who is on the boat, remains silent. Ethan takes command again and orders the crew to wipe them out. The pirate ship turns around to face the oncoming ship.
Back in the kingdom, Ted is hiding in a tree. Barty spots him and is going to use the crossbow on him, but Maurice suggests he use the sling shot. Barty fires the sling shot but the rock misses Ted, who jumps to another tree, but falls down when a gecko kisses him. The other lemurs capture him. Seeing no use in resistance, Ted tells the lemurs to take him away to be sacrificed, as at least he'll be remembered.
Back at sea, the two ships are heading front first into each other. Once the S.S. Peepee Pants collides with the Bonnie Bonnie, it bounces away. The pirates miserably fail at swinging onto the smaller ship, with Julien watching them. Clover and Mort climb aboard and Julien is glad to be saved, and tells them they should go now. Clover is disappointed they can't fight, and Mort agrees. The pirates recognize Mort as "Dread Pirate Mort", and Mort charges at them, Clover following not far behind. Ethan and Mort talk about the old days while they fight. Ethan beats Mort, but before he ends him, Julien runs over and knocks him into the water. Clover finishes the other three off and knocks them into the water. Julien tells Clover they can go now.
On the beach, the lemurs are preparing for Ted's sacrifice, while Maurice tries to convince Julien's parents to just bless the mangoes and let Ted live.
At sea, Julien, Mort, and Clover are sailing back, but the pirates are gaining on them. To help them move faster Clover, cleverly holds a fishing rod with Julien tied to it, dangling his feet for Mort to see. Mort, tied to the front of the ship, chases Julien's feet across the water. Clover tells them she can see the beach, wher everyone is there. Ted screams and the other lemurs run after seeing the ship coming towards the shore. Maurice starts crying seeing Julien alive. Julien tells him to stop since they have a bigger problem. Just then, the pirates' ship comes to shore and Ethan knocks Julien down to the ground. Julien now at knife point, Ethan asks for a king's ransom. Julien screams for help, and Sage lands on top of Ethan. Julien tells Sage that he is glad he heard the distress signal and saved him, but Sage says that he was actually having an argument with his hawk, who dropped. Mort grabs Ethan and throws him back up to the pirates. Maurice tells Julien he has to bless the mangoes, which he does. Julien gives some of the mangoes to the pirates as a thank you. The pirates leave after thanking Julien. Walking back to the kingdom, Maurice tells Julien about his parents.
In the throne room, Julien calls for his mother and father, sobbing. Julien runs towards his parents to hug them. His parents try block him with Maurice, who Julien throws out of the way. He hugs his parents happily and tells them they can be a family again.