Metal Sonic is a robotic version of Sonic the Hedgehog built by the mad scientist Dr. Eggman. He is the secondary villain in the Sonic the Hedgehog series and the main villain of Sonic Heroes; he is the second most recurring villain, only behind Eggman himself.
Metal Sonic is one of the main villains of Sonic CD. After Eggman attacks the Miracle Planet, Metal Sonic takes full control of it (as seen on holograms). Metal Sonic first appears to kidnap Amy Rose and escapes with her to the Stardust Speedway. Sonic (and Tails as the 2011 re-release is made canon to help understand Sonic 4: Ep 2 and Metal) later races Metal Sonic in the speedway and after an intense battle, Metal Sonic is defeated, sending him crashing into a wall and falling over the edge.