Jafar grew up in Agrabah as the illegitimate son of the sultan. He went to a dark magician, Amara, in order to seek revenge on the sultan and escape his life with an abusive blacksmith. Jafar stayed with Amara until he was grown. She had an obsession with serpents because of their ability to shed their skin and be reborn. She promises to teach him magic and they have a romantic relationship. However, Jafar gives her a potion that turns her into the serpent staff that he carries with him as a way of capturing her power for his own use.
In Wonderland, collectors sent by the caterpillar are chasing Will and Alice. The Red Queen captures Will when Will and Alice split up. Jafar wants a public execution for Will, but the Red Queen/Anastasia shows that she still has some feelings for Will, trying to get him to escape back to Storybrooke with the White Rabbit. However, Will dares her to kill him because he thinks that it is the one thing she’s not capable of doing.
The execution is about to begin, with the Red Queen and Jafar looking on as the executioner practices his beheading on a watermelon and launches the remains over the castle walls via catapult. Alice, with the help of Will’s old thieving buddy “Lizard,” disguises herself as the executioner and is able to launch herself and Will with the catapult into the Queen’s maze. However, they are soon overtaken by Jafar and the Red Queen.
In order to save Will, Alice uses one of her wishes, saying “I wish that if the Knave of Hearts dies, I die,” thus making it impossible for either of them to be killed because Jafar needs Alice alive in order to make her final 2 wishes. However, Jafar turns the Knave into stone, finding the loophole in Alice’s wish. The Red Queen allows Alice to leave because the Red Queen will go after everyone and everything Alice loves until Alice uses her wishes.
Meanwhile, Cyrus was able to get a wishbone from one of the guards. The wishbone myth was created by genies so that people would stop looking for genies to fulfill their wishes. The two halves of the wishbone want to be together, so Cyrus uses the wishbone as a sort of saw to try and escape from his cage. Will he be successful?