Answer:
Gorbachev came to power at a time when the Soviet Union was experiencing a deep slump. The country was engaged in a hopeless struggle in Afghanistan, military expenditure was very high, domestic troubles threatened because of the bad economic situation. Everything citizens needed for everyday life was lacking, there was a huge government deficit. The industry was very outdated and the party's moral authority had fallen to zero. In addition, under the leadership of Ronald Reagan, the US had surpassed the USSR militarily and built on its lead.
Gorbachev realized that it could no longer continue and that the country was about to collapse. To keep the Soviet Union and communism alive, reforms were inevitable. His predecessor Yuri Andropov, who had brought him to Moscow, already wanted to make changes, but was too often ill to start. Konstantin Chernenko, who succeeded Andropov, was also too ill to do much. Gorbachev decided to change the course. He expected that by giving people more initiative, they would generate more economic prosperity so that the state as a whole would benefit.
Gorbachev ruled with the slogan "uskorenie" (economic intensification), "glasnost" (openness) and "perestroika" (reform) and introduced "new thinking" in foreign policy. More and more far-reaching treaties to relax world politics were concluded with the West. But a less desirable outcome, at least for the Communist Party, was that latent nationalism emerged in the federated states of the union.
Later it turned out that Gorbachev had released forces that he soon could no longer control. The party bosses in the states, who began to put their cards on the advancing nationalism, soon began to become increasingly independent of the central authority in Moscow. Despite his (late) attempts to crack down on the independence movements in the various republics (especially the Baltic) with great force, a process had started that could no longer be stopped; except perhaps with massive and ruthless military intervention.
In August 1991, Old Guard communists attempted to reverse the increasingly out of control consequences of Gorbachev's policy with a coup attempt, but it failed and paved the way for the rise of Boris Yeltsin, the newly elected President of the Russian Federation, who performed prominently during these events. Gorbachev was restored as leader of the Soviet Union, but he was now completely outflanked by Boris Yeltsin. Soon, practically all the republics of the Union declared their independence, and behind Gorbachev's back, the CIS was established, replacing the old Soviet Union. The Soviet Union was officially dissolved in December 1991, ending Gorbachev's rule.