It was co-written by Adam Horowitz and Edward Kitsis, while being directed by Ralph Hemecker.
The waters of Lake Nostos erupt from the ground in the forest.
In the Characters' Past
At the The Evil Queen's fortress, Captain Hook/Killian Jones kills a guard in order to reach Belle, who is imprisoned there. Upon learning that she has no information that can help him kill Rumpelstiltskin, he prepares to kill her, but is disarmed of his hook by the Evil Queen/Regina who asks for his help in casting the Dark Curse. He agrees after she explains that the Dark One will be rendered an easily killed mortal man by the curse. His assignment is to travel to Wonderland via Jefferson's hat and kill her mother, Cora, whom Regina previously banished to that land. She enchants his hook so that it can be used to remove Cora's heart, and no more than one heart. He is sent with the corpse of the guard he killed, so that he can bring Cora's body back in accordance with the hat's "one goes in, one comes back" rule.
In Wonderland, Hook is brought before the Queen of Hearts, who reveals herself to be Cora. Hook attacks her with the enchanted hook, but fails to remove her heart as she does not keep it in her chest. She takes hold of his heart and forces him to divulge everything. After he tells her everything, she does not take control of him, as she knows Regina would detect it. Instead, she convinces him to side with her by explaining that Regina's curse would strip him of his identity, rendering him unable to exact his revenge, while Cora offers a guarantee of that revenge. Hook agrees to get Cora close enough to Regina to rip her heart out.
Hook brings Cora, who is feigning death, to Regina, and leaves them alone. Regina then confesses to her mother's "body" that she still loves her, but needed her dead because of Cora's own advice that "love is weakness," and Regina cannot allow herself to have a weakness if her plans are to succeed. Regina leaves and Hook returns to ask why Cora didn't kill her. She explains that matters have changed and takes him to another part of the Enchanted Forest to erect a magical barrier that will protect them from the curse. Cora explains that the curse is destined to be broken after 28 years, during which they will be frozen. Once the curse is broken, Cora will reconcile with her daughter, who will be distraught over her defeat, and "help her pick up the pieces."
In the Fairytale World
Emma, Mary Margaret, Aurora, and Mulan reach Rumpelstiltskin's cell, and Emma learns for the first time that he knew beforehand that she would be the savior. They search for the squid ink, but find only an empty container and a scroll with the name "Emma," written over and over. Aurora suddenly activates the mechanism that seals the enchanted cell, and Cora and Hook arrive and take the compass from them. Cora reveals that she holds Aurora's heart, and Hook insists that he would not have betrayed Emma. He now holds the giant's dead bean, which he likens to her and to their former association before he departs with Cora. Emma laments that her role in breaking the curse was all part of Rumplestiltskin's plan, and that she's not a hero who can rescue them now. Mary Margaret then realizes that the scroll is the same type of magical document as the spell book she watched Cora use when she was a little girl. Blowing across the scroll, Mary Margaret is able to use the copies of Emma's name, which Rumpelstiltskin wrote with the squid ink, as a spell to destroy the cell's door. Aurora insists that the others tie her up and leave her since she can't be trusted as long as Cora has her heart. Mulan reluctantly agrees, but vows to return the heart to her.
Cora and Hook travel to the dry basin of Lake Nostos, whose waters held the power to restore that which was lost. Cora magically causes water to erupt from underground. Hook pours the magical ashes into the new lake, and a portal opens. Emma, Mary Margaret, and Mulan arrive and a fierce battle ensues over the compass. Hook gives Aurora's heart to Mulan as a ploy to even the odds. Mulan immediately leaves to restore the heart to Aurora, but leaves her sword, which is powerful enough to deflect Cora's magic, with Mary Margaret. Emma bests Hook in single combat and knocks him unconscious. Then Cora renews her attack and declares her intention to give Regina Mary Margaret's heart. Emma interposes herself at the last minute, so Cora reaches into her chest instead. Cora mocks them, reminding them that love is weakness. But then she finds that she cannot pull Emma's heart out and Emma realizes, "No, it's strength," and a burst of magic comes from her and knocks Cora back. Emma and Mary Margaret take the compass and jump into the portal.
Mulan restores Aurora's heart to her and frees her from the cell. Aurora then reveals that Cora told her that the soul of a wraith's victim can be reunited with its body and they agree to try and restore the soul of Prince Phillip.
At Lake Nostos, Hook suggests that he and Cora use the lake to restore the petrified magic bean he took from the giant.
Mr. Gold's proposes a plan to destroy the portal to prevent Cora from traveling to Storybrooke, and Regina reluctantly agrees, convinced that it's the best way to protect Henry, even though the portal's destruction will kill anyone who attempts to use the portal, including Emma and Mary Margaret. She lies to Henry about her plans, claiming she is preparing for his mother and grandmother's return, and he praises her for having changed. Regina and Gold go into the mines and Gold uses his stolen fairy wand to draw all the power from the diamonds. The Seven Dwarves soon discover the theft of the magic, and they, along with Ruby, inform Henry, who realizes that his mother lied. Henry declares that they must stop her and protect Emma and Mary Margaret.
Gold brings Regina to the well in the woods, which will be the location of the portal, and casts a spell that creates a deadly energy. Henry and Ruby arrive and Henry convinces Regina to have faith in his belief that Emma and Mary Margaret will defeat Cora and be the ones to come back into Storybrooke. Regina absorbs the energy of the spell and it dissipates just in time for Emma and Mary Margaret to emerge. Henry explains that Regina saved them, and Emma thanks her. Ruby takes Mary Margaret to David, and she successfully awakens him with true love's kiss.
Emma confronts Gold over his manipulations. He acknowledges that his plots have involved her from the beginning, but he reveals that he did not control her destiny or make her what she is, rather, he simply took advantage of his knowledge of the fact that, as the product of true love, she would be an exceptional and powerful individual. Henry accepts that Regina has changed, and he embraces her. But when he, his family, and the Dwarfs leave with Ruby for a celebratory dinner, a despondent Regina is left behind and Gold mocks her. As the group walks to Granny's, Hook's ship, bearing him and Cora, appears just offshore from Storybrooke.
"Queen of Hearts" was co-written by series co-creators/executive producers Edward Kitsis and Adam Horowitz, while being directed by Renegade veteran Ralph Hemecker.
The episode makes references to Alice in Wonderland and Snow White.