He first appears when he is sent to the Miracle planet by Robotnik to defeat Sonic, though he fails and is erased from time.
He is rebuilt as Emperor Metallix due to the fact that although his body was erased his mind was not. He became the ruler of his own faction, the Brotherhood of Metallix.
After the destuction of the Metallix, Metal Sonic was revived one last time as one of the many villians that fought Sonic and Knuckles.
Though he was destroyed again in that last encounter, Grimer rebuilt him again as the Neo Metallix.