Basically, a kindly scientist named Kintobor accidentally crash-landed on Mobius after falling into a black hole. When he beheld an apparent paradise planet, he decided to use his science to protect it from evil.
He found six of the Chaos Emeralds, which are extremely good at absorbing energies and emotions, and used them to absorb all the negative energies and bad feelings on the planet. Problem was, he couldn't really control Chaos energy. He needed the seventh Grey Emerald to really neutralise the bad vibes. Keeping them at super-low temperatures was moderately effective, but without that seventh Emerald, it's a ticking timebomb.
But fuck that, right? We've got science on our side! The Emeralds were now automatically absorbing all the bad juju, it's all good, right?
There was an explosion where Kintobor, a rotten egg and a whole ton of Chaos energy and bad vibes got swirled together, creating Robotnik. Later on, Sonic was caught in a similar explosion and got super-charged with chaos energy and a planets worth of negativity. Thus was born Super Sonic.
The evil absorption was actually used to beat Captain Plunder and his sky-pirates once.