The episode opens in the capital of Agrabah, many years ago, where we find Jafar (Oded Fehr) lecturing the common people about their theft, as Aladdin (Deniz Akdeniz) sneaks around and commits that exact crime. Powerful, magical Jafar even turns a few of citizens into literal street rats, which is why Aladdin is so reluctant to fight against him when recruited by Jasmine (Karen David). Eventually, he agrees to work with her in stealing "the Diamond in the Rough" – a weapon with the most powerful magic in the world.
Then we see Emma (Jennifer Morrison) and Archie (Raphael Sbarge), in present-day Storybrooke, following the red bird that leads to the Oracle. They find what appears to be the girl's dead body, and they also catch Shirin trying to flee the scene. Back at the police station, Shirin reveals herself to be Jasmine, and Emma, Snow (Ginnifer Goodwin), and David (Josh Dallas) immediately believe in her innocence. They are shocked when she refers to Aladdin as "the Savior."
When Archie gets back to his office, the Evil Queen (Lana Parrilla) is waiting. Now that the Oracle may be dead, there is no one else to ask about Emma's visions. Archie refuses to help her, so she simply transforms herself to look exactly like him. The Evil Queen – now disguised as Archie – ties up the real Archie, leaving him at Zelena's house, and then chats with Emma, who believes there is hope for her yet. If Aladdin survived Savior-hood, maybe she can, too.
The flashback in Agrabah continues, and we find Jasmine and Aladdin bickering on their way to the Cave of Wonders, where Jasmine's books tell her that the weapon will be located. With a simple "open sesame," Aladdin is able to unlock the Cave. They quickly find some sort of gem balancing on a sword, and, assuming it is cursed, Aladdin replaces the gem's weight with another object. Suddenly, a crumbling column falls on them, and Aladdin summons previously unknown magic to save them both. Just as Jasmine expected, the Diamond in the Rough is actually Aladdin himself.
Again in Storybrooke, Imposter Archie confronts Emma in front of her family and implores her to tell them about her secret visions, before "he" leaves and turns back into the Evil Queen. Emma's family members are angry at her for hiding the truth, and Regina is particularly concerned that she might be the hooded killer. Then, they realize that the true Archie is missing.
The flashback continues again, and after Jasmine gives Aladdin a gift – a scarab that represents heroism – Jafar appears. He uses the red bird, which he describes as a "type of Oracle" to show Aladdin his future: an untimely death. Jafar explains that there is one way for Aladdin to alter his destiny, with a pair of golden shears that once belonged to the Fates themselves. He could go back to living a normal life, with all the riches in the Cave.
Nearby, Jasmine desperately tries to get her father's help, but he is under one of Jafar's spells. Before long, Jafar appears at the castle and places Jasmine in his classic, magic hourglass. Aladdin swoops in just in time, riding the Magic Carpet, having chosen to be the Savior after all. Later, Aladdin asks Jasmine to run away with her and help him fight Jafar, but she decides to stay and defend Agrabah.
Returning to Storybrooke, Regina has made a potion that links the magic of two Saviors. All Emma has to do is drink it, and she will be able to track Aladdin. They follow his traces to a crypt in a cemetery, where Jasmine is devastated to find the scarab – assuming that Aladdin is indeed there, buried. Perhaps Emma's Savior status will be her downfall.
Later, when Emma and Henry (Jared Gilmore) have a heartfelt conversation about what this means for them and their future, Aladdin appears. He planned to hide, using the scarab to throw them off, but hearing their conversation changed his mind. Aladdin explains that he did end up using the shears and that, as a result, Agrabah failed. He gives the shears to Emma, letting her choose if she wants to use them someday.
Emma and Henry somehow manage to convince Aladdin to go back to Jasmine, and when he does, their merriment is cut short quickly. Jasmine explains that she needs his help to defend Agrabah – which is in "terrible danger" – using his powers as the Savior. In response, Aladdin only manages to say, "yeah, about that…"
All the while, Archie has been at Zelena's, watching the baby. The sisters go to the spa and catch up, and eventually, the Evil Queen convinces Zelena (Rebecca Mader) that she can embrace her wickedness, without losing her daughter. When they return home, Zelena turns Archie into a cricket once again, putting him in a cage that hangs above her baby's crib.
At the end of the episode, Emma brings the shears to her family, no longer wanting to keep secrets. She doesn't plan to use them and even gives them to Hook for safekeeping. Hook (Colin O'Donoghue) hides them "leagues under the sea," where no one will ever be able to find them – or, at least, that's what he tells Emma.