Our story begins in a flashback to Fairy Tale Land as Captain Hook seemingly tries to rescue a captive Belle from The Evil Queen. But when he realizes Belle knows nothing about how to kill Rumplestiltskin and wouldn't help him do so even if she did, he quickly changes his mind about the rescue. It's too late, though-Regina has caught him. But instead of killing the Captian, The Queen makes him an offer. If he will travel to Wonderland and rip out her mother's heart, she'll use The Dark Curse to transport him and Rumplestiltskin to a land without magic, where The Dark One will be powerless and Hook can have his revenge. Hook agrees, travels to Wonderland and is brought before The Queen of Hearts. He tells her he's searching for Cora and the Queen reveals they are one and the same!
The plan to take Cora's heart doesn't really work out for Hook, though, and instead she reaches into his chest. When Hook reveals that he's there to kill her on her daughter's behalf, Cora hatches a new plan. She leaves Hook his heart and returns to Fairy Tale Land with him, pretending to be dead. When Regina is alone with what she believes to be her dead mother, she confesses that she needed her mother dead because she loves her too much, and in this new land and with The Dark Curse, she can't afford the weakness of love. This changes Cora's plans completely, and instead she and Hook sneak away, where Cora shields part of Fairy Tale Land from The Dark Curse. There she says she'll wait 28 years for The Curse to be broken and then, when her daughter truly needs her again, she will return to her and Hook will have his revenge.
In Storybrooke, David remains under the sleeping curse as Regina, Henry and Mr. Gold watch over him. Mr. Gold and Regina step away and he tells Regina in no uncertain terms that they can't let Cora come to Storybrooke. His plan is to use magic on the portal where someone could come through to Storybrooke, killing whomever it is that comes through. Regina argues that she promised Henry she wouldn't hurt Emma or Mary Margaret, and if they can defeat Cora and come through, she can't be responsible for killing them. But Gold argues that the possibility of anyone but Cora coming through that portal is remote at best and if she wants to protect Henry, she'll do this. She reluctantly agrees and the two of them steal magic from the fairy dust diamonds in the mines, using it to cast a glowing, green forcefield over the magic well in the woods outside of town.
In present-day Fairy Tale Land, Emma, Mary Margaret, Mulan and Aurora-who remains under Cora's control thanks to her heart being stolen-finally arrive at Rumplestiltskin's cell. They hunt for the magic squid ink, but all they find is an old scroll with the name “Emma” written over and over on it and an empty pot where the ink once was. Suddenly Aurora picks up a rock and throws it at the door control, snapping the bars shut and trapping all four women. Cora and Hook appear, taking the magic compass! Emma, Mary Margaret and Mulan finally realize what's happened to Aurora, but as they watch Cora and Hook walk away, they realizes there's little they can do about it. Meanwhile, Cora and Hook walk to Lake Nostos where Cora uses magic to unveil hidden waters beneath the dried lakebed. Hook spreads the ashes of the magic wardrobe into the water and the portal to Storybrooke has opened!
Trapped in Rumplestiltskin's cell, Emma has begun to lose hope. She realizes now that Rumplestiltskin made The Curse and knew she would break it and knew she would wind up in this cell. She's beginning to believe that her part in the story, her role as “The Savior,” is over. But Mary Margaret figures out Rumplestiltskin's puzzle. She blows the words off of the scroll, creating a cloud of squid ink, that dissolves the enchanted bars. They tie Aurora down for their own safety and rush off to Lake Nostos. There they battle Cora and Hook. Mulan is able to recapture Aurora's heart, thanks to a surprisingly gallant move by Hook. Emma takes the Captain out of the fight, but Snow finds herself cornered by Cora. The Queen of Hearts lunges forward to jam her hand into Snow's chest when Emma jumps in the way. Cora is ready to rip out Emma's heart instead when she realizes she can't. Instead, Cora is blasted back when Emma somehow summons a magical pulse! Not knowing how that happened, Emma and Mary Margaret jump into the portal.
In Storybrooke, Henry and Ruby have found Mr. Gold and Regina watching over the trapped well. Gold incapacitates Ruby while Regina tries to stop Henry. He begs her to undo the spell, that if she really wants to change and wants him to believe in her, she has to believe in him. She does and, against Gold's objections, dispels the forcefield. Suddenly, a hand reaches the top of the well. Emma hoists herself up, followed by Mary Margaret. Henry rushes forward to hug them. Mary Margaret hurries to Mr. Gold's pawnshop where she kisses her husband, breaking his sleeping curse. The whole family is reunited and once again it looks like a happy ending in Storybrooke. The only one looking unhappy is Regina who, despite really changing, has lost Henry to Emma. In fact, it seems she really has lost everything.
And on the horizon, drifting through the fog in the harbor, a pirate ship looms. On the deck of The Jolly Roger, Cora and Hook look out over Storybrooke. Thanks to the old magic bean the giant had saved, the pair have made the trek after all. Magic has come to Storybrooke and now, so have villains!