Invader Zim and the King of Thieves is the third film in the Invader Zim film series. It follows around on Zim's newest adventure: meeting the King of Thieves!
Invader Zim and his crush Ember prepare for their marriage. Zim returns once more to his old hideout to recover a dagger, his only memento of his lost father, who had abandoned his family when Zim had been a small child (it is implied that his mother has died). But during the ceremony they and the assembled guests find themselves the targets of a raid by the infamous Forty Thieves, led by a man named Cassim (John Rhys-Davies), who is after a particular piece of treasure: a staff which is the receptacle of a powerful oracle. Zim, Ember, GIR, Flynn, Aladdin, Abu, Jasmine and the Genie fight back against the thieves, driving them off. They discover the Oracle, who has the power to answer a single question about absolutely anything to any individual. When Iago accidentally asks her why the thieves want the staff so badly, she says that they were looking for the "ultimate treasure". Learning of the Oracle's power, Zim become curious about his past. She hints to him that those questions can be answered by his father, who is still alive much to Zim's shock. After some encouragement from Ember, Zim asks the oracle about his father; the oracle reveals that his father is with the Forty Thieves, "trapped within their world".
Believing him to be their prisoner, Aladdin, Zim, along with Abu, Iago, GIR, Flynn and Carpet, tracks them down and stows away into their hideout, Mount Sesame. He is shocked to find that Aladdin's father is not their prisoner at all, but their leader: Cassim, the King of Thieves. But, family or not, Aladdin has trespassed in their lair and Sa'luk (Jerry Obarch), Cassim's irate right-hand man, is eager to have him punished for it. Cassim, however, slyly suggests that Aladdin and Zim instead face "the Challenge"—an initiation ritual—where they must defeat another one of the Forty Thieves and take his place. Sa'luk fights Aladdin and Zim, but the latter just barely manage to prevail by throwing their opponent off a cliff into the sea. They are welcomed into the band, and Cassim reveals to Aladdin why he had left his wife and son: to find the Hand of Midas, a powerful artifact that can transform anything it touches into gold. Cassim believed that, with the Hand, he could return to his family and give them the life they deserved instead of one living out in the streets, and had instigated the raid so he could capture the oracle's staff and question the seer as to the precise whereabouts of the artifact.
Aladdin and Zim convince Cassim to come back with them to the Palace as their guest and, for a while, Cassim is happy to spend quality time with his son. Cassim meets with Jasmine and the Sultan, and they immediately take a liking to Aladdin's father, not knowing (since Aladdin and the Genie choose not to reveal the fact) that he is actually the King of Thieves himself. Yet, despite the warm welcome, Cassim cannot resist the urge to recover the Hand, and he decides to carry on his original scheme, winning Iago as a new friend and accomplice.
Unknown to all, however, Sa'luk has managed to survive his fall and made his way to Agrabah. He reveals himself to Razoul and sells out his fellow thieves by telling Razoul the password to their hideout in exchange for immunity from prosecution. After thirty-one of the thieves are captured, a disgruntled Sa'luk (who got angry upon not seeing Cassim in the cells) tells them that Aladdin and Zim are one of the forty, and Aladdin's father Cassim is the King himself.
While attempting to steal the Oracle from the palace treasure chamber, Cassim and Iago end up captured by the palace guards, who were ready for him, and Razoul reveals to the Sultan that Cassim is the King of Thieves. With no other choice, the Sultan has Razoul incarcerate Cassim and Iago in the dungeon for life. Aladdin and Zim are heartbroken, but decide not to leave Aladdin's father to rot in the dungeons. They free them both the very same night, but is discovered by Razoul. Although, branded fugitives themselves, Aladdin and Zim still refuse to turn their back on all he has come to love and returns to the palace to take responsibility for his actions. The Sultan prepares to punish Aladdin and Zim, but Genie, Ember and Jasmine come to his defense, stating that all they wanted was to give Aladdin's father a second chance. The Sultan accepts his apology, much to Razoul's dismay.
With the oracle in hand, Cassim and Iago return to Mount Sesame, only to be captured by Sa'luk and the remaining Thieves, whom Sa'luk has swayed to his side. Cassim is forced to use the stolen oracle in order to find the location of the Hand of Midas and then lead his men there. The Oracle directs them to The Vanishing Isle, a great marble fortress built on the back of a gigantic undersea turtle that periodically dives to the bottom of the ocean, where the golden Hand is hidden. Iago manages to escape from the group, and goes off to lead Aladdin, Zim and Jasmine, Abu, Ember, GIR, Flynn and Carpet to his imprisoned father.
Aladdin and Zim manage to free and reconcile with Cassim. Working together, they retrieve the Hand just as the turtle is beginning to submerge, when they are attacked by Sa'luk. Then, after struggling to escape the flood, Sa'luk takes Aladdin and Zim hostage, demanding that Cassim surrenders the Hand, and Cassim throws the Hand of Midas to Sa'luk. Foolishly grabbing it by the gold hand instead of the handle, Sa'luk turns into a gold statue. Aladdin, Zim, GIR and Cassim manage to escape with the Hand, but, finally realizing how much disaster his obsession with the item had caused, Cassim decides to toss it into the sea, realizing that his ultimate treasure is actually Aladdin, and seeing the great man his son has become. The Hand of Midas lands on the ship with the remaining thieves aboard, turning it into gold and sinking it.
Zim and Ember finally get married, with Cassim and Aladdin attending in the shadows, as Cassim is still wanted for his crimes. Also among the guests are several cameos from characters from the TV series. Iago decides to join Cassim as a traveling companion, and they both go off once again to see the world.
A reprise of Arabian Nights is then sung; the Peddler makes an appearance at the end of this film to mark the end of the legend of Aladdin (originally planned for the end of the first film) as Zim and Ember fly past him and wave good-bye to Aladdin, Cassim, Jasmine, Abu, Carpet and Iago.