A narrator tells a story about a gateway to the evil Netherworld standing in the form of a tree in a dark land upon a dark peak. Dark sorcerers sought the tree and fashioned it into a ship's figurehead. They mounted the gateway upon their vessel, the Black Viper, and ventured forth to spread evil to every shore of the seven seas. But their fate was met upon stormy waters. The narrator says that the fate will now plot to lure someone with the false promise of treasure.
The scene changes to the beach. Aladdin is digging for treasure for Iago. In order to find the treasure, Genie makes the sand dune explode, but everyone gets buried. Aladdin becomes fed up with Iago's treasure hunting scheme and leaves. A hooded figure, called a herald, rises out of the sea behind Abu and Iago. While Abu hides in fear, the herald asks Iago for Aladdin so that he can bring the street rat a key to unimaginable treasure. Iago wants to know where the treasure is located, but the herald says that it's only for Aladdin to know. Iago then tricks the figure into thinking that Abu is Aladdin. The herald gives Abu a shell to blow on. He then collapses and his skull rolls over. Iago and Abu are unable to blow on the shell, so Iago decides to make Aladdin blow it.
At night, Abu and Iago disguise themselves as the herald so Aladdin will not know that it's Iago's treasure hunting scheme. When they get to Aladdin, "the herald" tells the street rat that he's the ghost of a sailor who is doomed when his ship went down in cursed water. He gives Aladdin the shell so he can release him. The next day, back at the beach, Aladdin blows the shell and the sea bubbles make a path for the gang to walk. When they get into the deep ocean, Genie tells them that they're at a graveyard of eels and reads a book about the ship. Iago gets rid of Genie so that Aladdin will not find out that they're on a treasure hunt. Aladdin, Abu, and Iago see the ship's figurehead.
After Aladdin notices that Genie is gone and that Iago has been acting really strange while they were on their way, they hear a voice telling them that they must touch the figurehead and the treasure will be theirs. After Iago tells Aladdin the truth, he makes him touch the figurehead. Then there's a flash of lightning, and Aladdin is gone and Ayam Aghoul appears. He shows Abu and Iago that Aladdin's inside the figurehead.
Ayam tells Aladdin that it's his revenge, telling him to see what it's like in the Netherworld. Aladdin tells Abu and Iago to reverse the spell by making Ayam touch the figurehead. The animals grab Aghoul, but he manages to free himself. He then tries to grab Iago and Abu. When the two are in the wall of water, Ayam puts magic in there, making two eels go after them. When Abu and Iago get out, Ayam grabs them. Meanwhile, Genie is at the ocean floor still reading his book. When he reads about the figurehead, he goes to warn everyone about it, but he's too late. Meanwhile, Ayam shows Abu and Iago four skeleton sorcerers of the Black Viper. Genie shows up on a whale and knocks the four skeletons down and Aghoul goes after the jinn. When the whale gets in the wall of water, Genie smacks into it and the shell falls out and lands on Ayam's feet.
When Genie realizes that Aladdin touched the figurehead and he's in the Netherworld, he tries to make Ayam touch it. Aghoul breaks the shell and disappears. The walls of water crash down and Genie puts himself, Abu, and Iago in an elevator. They see the top half of the figurehead floating. He tells the animals that if they don't find the other half, they will lose Aladdin forever. Ayam is floating next to the other half of the figurehead. When he picks it up, Genie puts the top half on it and Ayam disappears and Aladdin is back.
Genie then throws the figurehead into the sky. Because of the treasure hunting scheme, Aladdin and the others then teach Iago a lesson by putting the parrot in a jar, making him believe that there are zombies.