A drunken doctor, two expectant families and a power outage in a small Iowa town would lead to one of the most chilling episodes of chance ever. On that fateful night three decades ago two families descended on the Fallville Hospital, the local Allens and the passing Thawnes each in the final stages of childbirth. The only doctor on duty was drunk and he bungled the delivery of the Thawne baby killing it. In restitution the doctor swapped the body of the Thawne child with one of the Allen twins, randomly choosing which baby to take. The Allens never knew that both their twins survived and were happy to devote all their love and attention to their "surviving" son Barry. The other twin had his chance for a normal happy upbringing dashed and instead found himself delivered into the arms of the Thawnes.
Malcolm Thawne (as they named him) quickly became a part of the Thawne enterprise. They were con-artists who possessed a family secret. All the Thawnes were capable of using a type of blue sorcerous fire that was powered by their hate. Hugo Thawne used Malcolm as bait for gullible people in his scams, however he never saw any of the rewards. The Thawnes and their real children taunted Malcolm that he wasn't their real relative and refused to teach him the secret of the blue fire. They physically and mental bullied him throughout his childhood. When old enough he ran away and began searching for his true parents. His search led him back to Fallville and the doctor that had made the switch. The doctor confessed the entire episode to Malcolm about the Allens. All Malcolm's childhood conditioning to hate manifested itself against the doctor and he murdered the man.
Malcolm then began following Barry, watching him and studying him. He initially resolved to confess to Barry his murder of the doctor, but he found out that Barry was a police man. The more Malcolm found out about Barry the more the gulf between then widened. Malcolm was alone, on the wrong side of the law and came from an abusive family. Barry had friends and a girlfriend (Iris West), he was the law and came from a loving family. Perhaps Malcolm could have moved on with his live, yet he stumbled upon the secret that Barry was actually the second Flash. Malcolm burned with hate and vengeance, he wanted revenge against Barry Allen, the person that he could have been if only a drunken doctor had not picked him.
Malcolm went around Hugo Thawne, to Hugo's own mother. She detested her offspring as much as Malcolm and taught him the secret of the blue flame and many dark spells. Together they forged his hate for Barry and the world, he desire for revenge and for vengeance into a physical object - the Cobalt Blue Gem. It was forged with a prophecy - even if it took a thousand years the flames of the Gem would consume two Flashes and it would kill Barry Allen. Then donning a full face mask (Malcolm and Barry were identical twins) he attacked the Flash and Kid Flash in Central City. After a heated battle Cobalt Blue was defeated and consumed by the flame. He rested in parts unknown, healing and gathering his forces. Then when ready he re-entered the real world to discover that his target was gone. Barry Allen was already dead.
If he couldn't have revenge against Allen then Thawne found have revenge against his memory and his successor. As Cobalt Blue he destroyed the Flash Museum and fought Wally West. When the face to face confrontation came he was easily defeated by West. During the battle he taunted West with his history and the prophecy of the Gem. West was put in a dilemma, Barry had died saving the entire universe, yet he did spend several months in retirement in the 30th century - in reach of the Gem's powers. Wally marshalled Jesse Quick, Impulse (Bart Allen - Barry's grandson), Jay Garrick (the original Flash) and Max Mercury. He gave each of them a sliver of the gem to act as a guide and launched them into the time stream.
In one of the most audacious time travel expeditions ever stages the six speedsters contacted six other speedsters at different time periods within the next thousand years, those speedsters then helped contact more speedsters, and so on. In relatively few jumps all the Flashes and speedsters aligned to the Flash Dynasty within the next thousand years had been located and warned of Cobalt Blue's prophecy. The first Flash to fall was Chardaq Allen, a profiler with the 25th century Policenet who had long since lost his police powers, he was possessed by the Gem while studying it. He was freeded from its thrall by Wally West and the unwilling Professor Zoom (himself a descendant of Thawne). Up and down the centuries duos of Flashes fought Cobalt Blues created by the Gem.
Jay Garrick (who did not have the endurance of the younger speedster) had returned to the twentieth century to check on the imprisoned Thawne. However Thawne had one last trick up his sleeve, he used blue flame to leave his body and possess Garrick's. Jay became the second Flash to fall to the prophecy. Then using the cosmic treadmill he followed the speedsters into the timestream. Thawne was able to establish control over the slivers of the Gem that the speedsters had been using to track the main Gem and mentally enthral their holders. When he finally arrived in the 30th century Thawne had in his control every Flash from Jay Garrick onwards. The only two free Flash's were Wally West and Barry Allen (who was still alive in that era).
Barry and Wally's first action to was free Jay. Then the three of them sent the controlled Flashes back to their own time by jamming the vibrations that speedsters use to travel in time. All that were left were the shards of the Cobalt Blue gem. The essence of Thawne had been removed from Jay and manifested through the shards of Gem. In one last effort it blasted Allen from behind. This killed Allen and caused a temporal paradox - Barry had yet to return to the 20th century to save the universe so that future could not exist. It was resolved by Wally West travelling back in time and grabbing Cobalt Blue before he fired at Barry. West moved so fast that not even Barry saw him. Wally finally defeated Thawne by opening up the entire Speed Force to him, the surge of energy dissipated Cobalt Blue for good.
The fragments of Cobalt Blue Gem was found by the descendants of Thawne and reconstructed. However it was finally destroyed in a battle between West and Professor Zoom as part of the mass speedster time travelling that was organised against the Gem's original prophecies.