Many years ago in Agrabah, Cyrus gambles a golden compass with magical properties. His brother, Taj, wants him to quit while he's ahead. This doesn't happen. Cyrus wins the game, but infuriates the loser. The man who lost the match sets fire to his home. His mother is inside. She's badly hurt. Her only hope is aid from the Well of Wonders. Cyrus and his two brothers try to take some of its water. They are halted by Nyx, guardian of the well. This strange creature says their mother's fate is already sealed. They need to return the water or pay the price. Cyrus refuses to do so. He convinces his brothers to steal the water, too.
In present day, Cyrus reveals that the person who cursed him and his brothers to become genies was the guardian of the Well of Wonders in Agrabah. There happens to be a well in Wonderland, too. Cyrus and Alice are off to find it. They come to two doors. A knight tells them only one door will lead them to the well. Alice is able to figure out the riddle that leads them down the right path. Cyrus lets her know that he needs to go the rest of the way alone. This is his burden.
Cyrus asks Nyx for mercy. That's not something the guardian dispenses to those who do not deserve it. We jump back to the past when Cyrus gave his mother the water from the well. He pours the bottles of his brothers out as well. It works. Their mother, Amara, is revived. In the present, Nyx tells Cyrus that his mother is still alive. He must return the water to lift the curse.
In the past, Amara tells her sons to leave once she learns they stole the water. It's too later though. Nyx appears and curses them to a life as genies inside three bottles. In the present day, Alice lets Cyrus know that everyone makes mistakes. Her biggest regret is that she once gave up on him. She wanted to forget. This was all in the past. They now need to move forward. They need to find his mother.
The Red Queen brings the Knave of Hearts along as she initiates her plan to build an army. Their first stop is to see the White Rabbit. The Red Queen wants him to tell the villagers that she can be trusted. She's caught off guard when she learns that Jafar has a new ally. Speaking of the Jabberwocky, she threatens and ultimately kills a villager to find out info on the genie. She finds a dead Lizard in her home. She promptly cuts out her eyes. The Jabberwocky gives them to Jafar who creates a spell to see that the Red Queen has the genie he seeks.
The Red Queen orders the Knave back inside his bottle as she confronts the Jabberwocky. She stabs her with a sword, but there's only one blade that can do her harm. The Jabberwocky overcomes the queen. Jafar orders his new prisoner to make her wishes so he can control the genie. He stifles her voice before she can wish him out of Wonderland. Jafar tells the Jabberwocky to break the Red Queen's will.
The Jabberwocky tortures the Red Queen with her words. She tells her that it's only a matter of time before the Knave finds out who she truly is. The Jabberwocky forces the queen to wish for her crown to make the Knave's suffering end. Then she's ordered to wish for her jewels. The third wish is made for the Jabberwocky to stop her torture. This sends the Knave back into the bottle which is now held by Jafar, who also holds Amara captive in his serpent staff. He is in complete control now. Jafar is ready to initiate his plan for ultimate power.