The Giant Rock is an ancient, giant stone that possesses huge amounts of Primal energy.
Mega Evolution Acts
The Giant Rock first appeared when Alain, Steven Stone and Mairin discovered it in ancient ruins. It accidentally triggered Rayquaza's appearance and made the Legendary Pokémon destroy the area in its Mega Evolved form. But despite this, the Team Flare leader, Lysandre picked up energy readings that are similar to the Megalith in Rustboro City and ordered Alain to check it out.
During Team Flare's experiments, Mairin's Pokémon, Chespie came in contact with a Zygarde Core with a Red Spot in the Lysandre Labs. Chespie managed to help it escape, but in the process, it became subsumed by Zygarde and the Megalith's energy, which resulted in Chespie going into a coma.
Season 19: XYZ
During Team Flare's siege in the Kalos region, Lysandre secretly activated the Giant Rock and formed it into a destructive version of a Zygarde, absorbing Chespie in the process. The Giant Rock Zygarde began traveling towards Anistar City, where it would get in contact with the giant sundial and once the two fuse together, it would create an explosion that would exterminate every living being. However, with some help from the Kalos gym leaders, Malva, Clemont, Meyer, Serena, Professor Sycamore, and Diantha, Ash and Alain managed to reach the core of the Megalith Zygarde and rescue Chespie. When everyone assumed that the threat is over, all of their Pokémon attacked the Giant Rock Zygarde all at once. However, Lysandre gained control over it with the remote control on his arm. Just as Lysandre was about to deliver the final blow on everyone, Squishy and Z-2 stepped in and summoned every Zygarde Cell in the world to turn into their Complete Perfect form. And as Ash's Pikachu, Greninja, and Alain's Charizard destroyed Lysandre's remote, Squishy and Z-2 destroyed the Giant Rock Zygarde with Core Enforcer, which resulted in possibly killing Lysandre, healing Chespie, and ending the Kalos crisis once and for all.
Ash later remembered fighting against the Giant Rock Zygarde with his friends, Meyer, Alain, Steven, Diantha, and the Kalos Gym Leaders during the final battle with Team Flare when he was reflecting back on his journey.