Looming over the Vaniville Town children, AZ asks them how they intend to live from now on. Recalling the disdain from the citizens of Lumiose City, Y, Tierno, and Shauna confess that they have begun doubting if their fight against Team Flare was worth it in the end. AZ brings out the key to the ultimate weapon, revealing that he was the one who made it and retrieved the key from the Team Flare Secret HQ, explaining that the weapon can't be reactivated without the key and he does not wish to see the tragedy from 3,000 years ago repeat itself. Despite this, X and Y ask AZ why he didn't simply destroy the key and risked letting Team Flare stealing it from him. AZ admits that a part of him still believed that a day of great despair may come when the ultimate weapon has to be used again, which prevented him from destroying it for good. Seeing the intimidated citizens of Lumiose City crowd around them, AZ declares that their world is still filled with intolerant and xenophobic people, just as it was 3,000 years prior, and that "everything must end".
As AZ turns to leave, the children realize that he means to reactivate the ultimate weapon and chase after him, causing AZ to send out his Golurk to attack. As her friends protect each other and the townspeople, Y yells at AZ to stop, prompting him to ask her why she's doing this for people she believed weren't worth saving. Y responds that this was the same philosophy that Lysandre and Team Flare espoused. As Golurk prepares to blast Y, X orders a Pin Missile from Marisso to intercept the move, only for AZ to leap into the barrage and take the attack with his body to everyone's surprise. Recalling Golurk, AZ shows the children the shattered remains of the ultimate weapon's key, declaring with a smile that they have convinced him of their answer. Y realizes that AZ's actions weren't just to prevent the ultimate weapon from being used, but also to encourage them from not taking the same path Lysandre did. Finally at peace, AZ prepares to leave when he sees a familiar petal land in his hand; looking up, he is shocked to see the return of his friend, the Eternal Flower Floette, and he falls to his knees in tears. As the group watches AZ depart, Trevor guesses that Lysandre must have lost himself in despair after years of philanthropy in a bid to help the disadvantaged, and his bitterness led him to founding Team Flare in the first place.
To the group's surprise, they turn to see Professor Sycamore and the Kalos Gym Leaders having gathered behind them to investigate the brief commotion AZ caused. To Shauna's joy, a Furfrou next to Clemont and Bonnie leaps at her, confirming that she has finally reunited with her long-lost Pokémon. Clemont also hands Malva's Delphox over to Trevor, revealing that his team faced it in a tough battle and defeated it, but Shauna's Furfrou stood guard over it and refused to leave, leading him to conclude that it was connected to Trevor's group somehow. Grimly, Trevor realizes that Delphox was the missing Fennekin that he'd been searching for. Professor Sycamore declares that he intends to host a parade to honor the Vaniville children, only to be stunned when they decline his offer after a brief discussion. X points out that they still have many affairs to settle before they can think about celebrating, and the five friends turn to head for home. Following a long journey through Kalos, X's group finally reaches Vaniville Town, where Y has a heartfelt reunion with her mother Grace.
Three months later, the Vaniville Town children returned to pursuing their dreams, with Shauna establishing herself as a full-time Furfrou stylist and Tierno forming a popular dance troupe with the children living in Lumiose City's back alleys. Trevor has also moved to Lumiose City to become Professor Sycamore's research assistant, in order to replace Sina and Dexio who have gone to the Alola region. In a flashback, Blue, Blaine, and Professor Sycamore discuss sighting a Zygarde Core after the battle against Lysandre; Professor Sycamore confirms that a similar creature was sighted in Alola, and deploys Sina and Dexio to investigate.
Separately, Y has returned to her training to become a Sky Trainer, while X dismantles the tent he built over Rhyrhy now their journey has finished. X confirms that he's headed to Shalour City at Korrina's request so he can go through the ceremony to become an official Mega Evolution Successor. Y muses that Yvette has likewise been encouraging her to pursue becoming a Vivillonist, asking X to visit their friends when he passes by Lumiose City. X thanks Y, who gleefully asks him to repeat it again much to his embarrassment.
At Shalour City, Korrina is annoyed that X failed to invite his friends to witness his own succession ceremony, pointing out that Gurkinn and his students, Blue, Blaine and Diantha are all in attendance. Pointing out that X couldn't have mastered Mega Evolution without his friends, Korrina badgers X into inviting them over, and all of them agree to do so despite the last-minute request. With Alexa and Viola recording the event, X and L'il Kanga are officially recognized as true Successors of Mega Evolution.