As Sonic celebrates his birthday with his friends, a mysterious being known as the Time Eater suddenly appears, destroying the party and sucking everyone through various "time holes", scattering them across different places in history. Sonic tries to stop him, but the monster easily knocks him out. After regaining consciousness, Sonic finds himself in a strange dimension known as 'White Space', a realm where time and space ends up after it has been 'erased' by being drained of color and life. As Sonic searches for his friends, he encounters his younger self, Classic Sonic, along with a younger, Classic Tails. As the two Tails determine that Time Eater's actions are damaging time and space itself, both Classic and Modern Sonic race through their history, restoring time to normal and rescuing their friends.
After restoring the worlds and collecting all the Chaos Emeralds, they discover that the mastermind behind the now perfected Time Eater is none other than Dr. Eggman.