Tinkerbell captures Peter Pan's shadow once again and destroys it. When it's gone, the Blue Fairy wakes up and gives her her wings back as well as the wand of the black fairy which can help switch Henry's body back.
Rumpelstiltskin casts the spell and the bodies are switched, but since Pan created the bands that can stop magic, he removes it from his wrist and moves it to Rumpel's. Then tells Rumpel he will kill everyone he loves.
Rumpel calls up his dagger he hid on Neverland from his shadow but to destroy Pan he must also kill himself, which he does as everyone watches. Belle and Neal are heartbroken.
Regina is the only one left to break Pan's curse but there is a price. She can never see Henry again. Everyone will be returned to the Enchanted Forest and Emma and Henry will be left in the real world. Storybrooke will disappear forever.
Although Emma and Henry will lose all memory, Regina gifts them with a past where they were never apart. Their past memories will be a lie but they can build a future on them.
One year later, Emma and Henry eat breakfast when Hook shows up at their door. He says her family is in grave danger and kisses her hoping true love's kiss will restore her memories but it doesn't work. Emma closes the door on him, confused.