In the land of Agrabah, Taj and his brother, Rafi, watch their sibling, Cyrus, play a card game in which he bets using a golden compass. Cyrus wins the game with the help of the compass and prepares to collect the money pool when the other disgruntled players accuse him of cheating. As a fight nearly breaks out, the owner of the tavern barks at the instigators to leave, though the men threaten that Cyrus will pay for what he did. Afterwards, the brothers celebrate the victorious game with the remaining patrons. At night, the trio walk home to discover their house has been set aflame by the thugs from the tavern. Their mother, Amara, is grievously burned in the fire and may not survive. Taj doesn't Cyrus' idea of travelling to the Well of Wonders to collect mythical magical water to heal her as he fears the legend of it may be false. Eventually, he agrees after affirming his own duty to their mother as the first-born son.
They arrive at a pavilion with a lakebed of water in the center. As they scoop up the water, the guardian of the well, Nyx, rises from beneath the surface. She states that the water can only heal those who are not yet destined to pass on, but knows Amara's fate is to die. Nyx warns them to return the water or pay the price. Cyrus chooses not to listen, deciding that he must set right the mistake he made in riling up the tavern men, and doesn't want their mother to pay the consequence for his own action. For their mother's sake, Taj and Rafi decide to follow through, and Amara is healed using all three canteens of water that they procured from the well. Rafi accidentally lets it slip that they revived her using water from the Well of Wonders. In a panic, she urges them to leave Agrabah before Nyx comes, but her warning comes too late. Nyx curses the three brothers, entrapping them in different bottles as genies, to serve the desires of other people. ("Dirty Little Secrets")
As a genie, Taj presumably carries out his duty of granting three wishes to whomever summons him out of the bottle. The sorcerer Jafar gains Taj's bottle as well as Rafi's in his and Amara's quest to change the laws of magic. ("The Serpent")