The Legend of X, Y, and Z! (XYZの伝説！ The XYZ Legend!) is a special episode of Pokémon the Series: XYZ.
Professor Sycamore and Alexa visit some ruins that were recently discovered in the Kalos region. The stone statues discovered in these ruins may be the key to solving the mystery of the myth concerning the legendary Pokémon.
A long time ago, there was a legend formed in Kalos. A girl, looking like Serena, named Aila, asked of the boy, Jan, not to go away. Jan promised he would defeat Yveltal and asked of Aila to wait for him. The boy dispatched his Talonflame and rode on his Gogoat away. In the present, Sycamore is going to the ruins. He activates his device, seeing he has to search for the maiden statue. Alexa is at the site of the ruins, documenting the workers, who are excavating the ruins. She is greeted by Sycamore, who confirms he also came to inspect the ruins, which could confirm the Legend of Kalos as the truth. Alexa sees it is a miracle these ruins have not been found earlier. Sycamore asks where is the maiden statue, so Alexa shows him the way, through a tunnel. Alexa explains the ruins were found through satellite images, and it took some time for the excavation team to arrive, since the area around the ruins are quite dangerous.
Sycamore asks why is Alexa here. She explains there are certain buried artifacts that may confirm these ruins were where the civilization of Kalos started. She wanted to make a report to show how people and Pokémon lived back then. The two arrive to the maiden statue; Sycamore recalls this is the statue of Aila, who is mentioned in the legend. Alexa notes how the statue is well-crafted, as if capturing her living moment. Sycamore notes how the description of the chapter of the Stone-eyed Maiden sums up how the girl looked like. Sycamore explains how it has been believed the legend was a fiction story or an actual event, shrouded with controversies. Alexa thinks Sycamore doubts that this statue was even made by humans; Sycamore points out the statue looks too authentic to be an ordinary one. He fears the statue is actually Aila, who was turned into stone by Yveltal. He believes so because the ancient text has an engraved "Y" letter on it.
Sycamore explains the tale is about a young poor man named Jan and Aila, the daughter of the village's leader; the two were very close. However, a seer, looking like Olympia - named Olympica, foresaw the coming of Yveltal, who, upon reverting to cocoon form, would absorb all the life force from every being on the world. Aila's father ordered Jan to slay Yveltal and if he would be successful, he could marry her. Despite this, Aila refused that Jan would go hunting Yveltal, reminding it is very powerful and Jan could not defeat it. Jan promised he would find it and defeat it, then went away. However, just as he rode on Gogoat, he turned around to see Aila had encountered Yveltal. Jan started firing arrows at Yvetal, but missed. His Talonflame went to attack, but Yveltal turned it into stone and attacked the town, turning it into stone as well. Jan went to fire an arrow, but Aila ran to stop him. In that attempt, Yveltal fired an attack at Aila, turning her into stone. Jan fell down, while Yveltal escaped.
Yveltal went deep into the woods and absorbed the life force from the forest, then reverted into the cocoon form and went into a lake. Jan soon found out that Aila was turned into stone and cried out for her. Sycamore explains Yveltal supposedly awakens after a 1000 year slumber, although it is uncertain if it is in a cocoon or its active form. Olympica visited Jan and explained many left the mountain and she would follow. She told Jan that Xerneas could revert the changes Yveltal did. She explained that if it were to form into the tree form, it could restore life, including Aila. Jan asked where Xerneas was currently and was told in a forest that shines like a rainbow. Alexa notes the "X" in the ancient text refers to Xerneas. Since Xerneas moved from one forest to another, Jan's search took years. One day, his Gogoat started staggering and Jan found a Scatterbug on the ground. Jan feared Yveltal consumed the life force.
An old man came with some weakened Scatterbug, reporting Xerneas was taken away. Sycamore explains the one that took Xerneas was a castle lord, who wanted to control of Xerneas' power to give life itself. Alexa wondered if it is the human ego that allowed the forest to rot, which Sycamore confirms. Jan went to the castle, whose lord was infuriated Xerneas reverted to its tree form and wouldn't share the life itself. He ordered the people to burn it down, since it didn't offer any blessings. Jan arrived and demanded that the fire was put out. The lord claimed Xerneas was theirs and they could do whatever they want. Jan reminded it was an Legendary Pokémon and doom would follow if they hurt it. Just as the lord ordered his guards to dispose of Jan, a cry was heard, as green cells appeared everywhere and formed into a being. Alexa notes that must be Zygarde, which Sycamore points by its symbol, "Z". He explains it appears when someone wants to destroy the ecosystem of Kalos. Zygarde unleashed its fury, destroying the castle and dousing the fire off Xerneas tree. Alexa notes how Zygarde, like the human body, was there to restore anything vile back to order. Sycamore notes it is why it is named as the one that watches over the order of Kalos.
Zygarde reverted back and by the time Jan woke up, he saw that Xerneas returned to its original form. Jan begged Xerneas to save Aila, but Xerneas ran away. Jan returned to the Aila's statue. He knew despite the destruction, the life on the soil would regrow back even better. Thus, he carried Aila's statue to a cavern, where he swore to protect the land. He helped the land grow back and even wrote the events to remind the people what happened. Some years later, the land withered, due to a drought. In the cavern, Jan noticed Xerneas arrived. It used its power to restore the land, giving back the life into plants. However, it did not restore Aila and left. Sycamore states Xerneas and Yveltal are present to balance life itself, while Zygarde is present to restore that balance. Sycamore believes Zygarde is watching them even now, through its Cells, which are invisible and spread throughout Kalos, something they saw during Team Flare's incident.
Alexa asks about Jan's fate. Sycamore explains the legend does not tell its fate, but he and Alexa think Aila knows, as does Zygarde. Sycamore asks Alexa if there are other ruins about. Alexa confirms and shows him around. One day, Jan and Gogoat were lying on the floor, being very old. A girl resembling Bonnie and her Dedenne approached the shrine. The girl was surprised at their presence, wondering what Jan was doing. Jan explained he was conversing with Aila, how fortunate is they can see more flowers blooming, thanks to Xerneas. The girl was interested more about Xerneas, which Jan encountered a long time ago. The girl thinks he is lying, but Jan swears he saw it, along with Yveltal and the "Z" Pokémon, which helped this land maintain its beauty. The girl wished Jan would tell her more about that at her house. Jan decided he wouldn't leave, since Aila is still present, wishing to be with her. Jan thanks the girl for her time, but states he will take a nap.
Since then, the maiden, Aila, and Zygarde, are keeping the legacy of Kalos intact.