When King Julien plays a mysterious mixtape, it activates a deadly sleeper agent brainwashed by his uncle.
Julien gets Ted, Mort and Maurice to stack themselves on top of each other to fix a light. The tower breaks and Mort knocks off Amelia's head. While King Julien checks for any damage, he finds a "Killer Tunes" tape lodged up in the back Amelia's big skull. He plays it for the kingdom
While playing the tape, Pancho starts twitching, but Clover soon destroys the music. After taking Maurice and Julien to the safest room (which is a bathroom outhouse), she tells the two about the "Footstool Program".
They learn that Former King Julien (Julien's uncle) had brainwashed a bunch of innocent lemurs to attack his enemies, especially King Julien. First, he wiped their memories. Next, he brainwashed the agents. Then, he played the mix tape to activate them. Then, to make sure the agents blend in with the kingdom's citizens, he made them take advanced improv classes. Then, he made them bathe him. Uncle King Julien got bored with the program eventually, and killed the agents except for Pancho. Clover tells King Julien that Pancho was activated by Julien playing the tape, and that he is Pancho's target. They decide to lay out a trap with Julien as the bait.
Clover's trap captures Pancho. They then enlist Uncle King Julien's help to stop him.At first he refuses,but when they were going to drop him back in the bottomless pit,he hastily agrees. When they go back, Pancho has tied up Mort and gagged him with a mango. Pancho attacks the group and captures King Julien.
Pancho takes Julien back to cave hideout. He tells King Julien that he wants to kill him but that there is also a tiny voice in his head, that is telling him not to do it. He wants King Julien to help him figure out who he is. All he remembers from his childhood is a house with a red door on the outskirts of the kingdom. Julien agrees to take Pancho there.
Mort finds a part of King Julien's crown. The group follows the trail, but Uncle King Julien faints. After some convincing from Maurice, Clover agrees to leave him tied to a tree. Her instinct not to leave him unsupervised was right, however, and he soon escapes. Inside the abandoned house, Pancho starts to remember that he lived there. His father liked gardening, his mother had blue eyes, and his little sister always wore a little yellow bow on her head. Uncle King Julien arrives via an underground tunnel that he had made during his reign, and Pancho is confused between killing Uncle King Julien or King Julien. Julien tells Pancho that Uncle King Julien brainwashed him and wiped his memories, causing an enraged Pancho to attack his uncle. However, Uncle King Julien says the words Fontanelle Elipsis Schmear, causing Pancho to run away. After leaving the house, King Julien bumps into his friends and tells them what Uncle King Julien had done.
The four head towards the nuclear submarine, where Pancho attempts to blow up the kingdom. Clover, Mort and Maurice create a diversion, allowing the king to try and shut down the missile launching from the submarine. Pancho battles with Clover and successfully knocks her out. King Julien successfully deactivates Pancho, who saves the kingdom by shutting down the missile. Uncle King Julien reveals that he has the missile out fitted with a manual override code that only he knows. Pancho attacks him, full of rage. The missile launches, but instead heads in the other direction.
After having a party at Pancho's house, Pancho thanks King Julien for helping with finding his family. The last lines are spoken by Pancho: "Yeah. I'm so glad I found my family. My real family. We're gonna be together forever and ever and ever...and ever."