In the Mania Mode of Sonic Mania, and its expansion Sonic Mania Plus, the Chaos Emeralds were collected by Sonic, Tails, Knuckles over the course of their adventure. When Sonic got transported to the Egg Reverie Zone, where Dr. Eggman fought the Phantom King over the Phantom Ruby, Sonic used the Chaos Emeralds to go Super Sonic. After delivering the final blow to the villains, the Chaos Emeralds separated from Sonic (thus returning him to normal) and reacted to the Phantom Ruby, causing the ruby to take Sonic and itself through a warp to another dimension while the Emeralds scattered. Later, in the Encore Mode of Sonic Mania Plus, Sonic and his comrades assumed their respective Super States in Titanic Monarch Zone with the recollected Chaos Emeralds in order to escape a space-time rift created by the Phantom Ruby.
In gameplay, the seven Chaos Emeralds can be obtained in both Mania Mode and Encore Mode by clearing all seven Special Stages in each Mode. Within these stages, UFOs carry around their respective Chaos Emerald. If one of the playable characters in the game (Sonic, Tails, Knuckles, Mighty or Ray) collects all seven Emeralds in a Mode, they can enter their respective Super State in normal gameplay. In Sonic's case, collecting all seven Emeralds in Mania Mode also allows the player to enter Egg Reverie Zone as Sonic, where the final boss of Sonic Mania is fought, after clearing Titanic Monarch Zone. Defeating the final boss will in turn unlock the true ending of Sonic Mania's Mania Mode. Similarly, collecting all the Chaos Emeralds in Encore Mode will unlock this mode's true ending, which will appear after defeating the Phantom Egg in Encore Mode.
In other media
Sonic Mania Adventures
In Sonic Mania Adventures, Dr. Eggman used Sonic's absence to look for the seven Chaos Emeralds to power up Metal Sonic with. Eventually, he found four of them after digging around on Angel Island. The fifth one, which was in Sonic's possession, was later used by the hedgehog to lure Eggman into a trap the latter had set up for Sonic. The location of the last two Emeralds, however, were unknown to Eggman. Eventually though, Eggman located the sixth Emerald on Angel Island and began excavating it, only for Sonic and Tails to claim it after they found and defeated him.
The final Chaos Emerald was found by Mighty the Armadillo. However, he was forced to surrender it after Metal Sonic threatened to harm his friend Ray the Flying Squirrel. Metal Sonic thus took the Emerald and flew off to give it to Dr. Eggman. When Sonic and Tails later came to Eggman's base, Metal Sonic took the duo's Chaos Emeralds as well using the base's force-field traps. Metal Sonic then received the last Emeralds from Eggman, giving him an enormous power boost. However, Tails managed to separate the Chaos Emeralds from Metal Sonic and eject them from the base using the base's own force-field traps.