Gorbachev wanted to reform communism, not replace it. But, his reforms snowballed into a revolution driven from below rather than controlled form above.
If not for him, the declining Soviet Union could have probably hung on for another decade or so. It did not have to collapse so quickly, but Gorbachev’s humanitarian tinkering contributed greatly to the timing.