Hundreds of years prior to the movie's events, Yveltal almost destroyed all life in Allearth Forest. Xerneas saved Dace and many other Pokémon from the destruction, and later reversed all the damage Yveltal did. After this, Yveltal turned into a giant cocoon and slumbered until the events of the movie.
Argus and Millis Steel, Marilyn Flame, and Ninja Riot were fighting over who should catch Diancie. They eventually took their fighting to an underground pool in which Yveltal slept, in its cocoon form. The fighting eventually awakened Yveltal, and it immediately activated its Dark Aura, then used Oblivion Wing to petrify large areas of the forest, as well as Team Rocket, Marilyn, Riot, the Carbink servants (save for Dace), and the Steels, who tried to stop it with missiles from their ship. Ash and Pikachu tried to battle Yveltal as well, but almost fell off a cliff (with Pikachu being petrified in the process). Diancie then Mega Evolved and created a large diamond, which she used to protect Ash, Serena, Clemont and Bonnie from another Oblivion Wing. Yveltal then used Oblivion Wing once again to finish them off, but the attack was intercepted by Xerneas' Aurora Beam. Yveltal, still in its Dark Aura state, used Shadow Ball, which Xerneas intercepted with another Aurora Beam before using its Fairy Aura to successfully calm Yveltal. With nothing more to do, it flew away peacefully.
Yveltal was last seen flying through a mountainous area at night during the credits.