On paper, the Soviets won the war.
On paper means that they achieved tactical victory over the Chinese. For most Soviet citizens, however, it felt as if they lost. The majority of the world had imposed sanctions on the nation. Even with the raiding of the Chinese treasury and 'contributions' from Warsaw Pact nations, the number of people in poverty and/or starving increased. This wasn't at all good for the Soviet leadership. Premier Brezhnev was in a tough situation. Despite presiding over a country that committed a large number of war crimes and human rights abuses, some senior members of the military and the leadership were fed up with all of Brezhnev's antics.
If it was just a segment of the total government, then Brezhnev wouldn't have much to worry about. But this was multiple groups, and (most dangerously) included most of the military.
The military was mad at Brezhnev for multiple reasons, mostly stemming from the aftermath of the war. While soldiers who were injured during the Sino-Soviet War were originally going to receive a pension, monetary shortages and corruption had resulted in that never coming to fruition. Seeing their comrades on the freezing streets greatly angered the troops, and their commander-in-chief who seemed to them to be doing absolutely nothing.
At about 5:00 AM on January 17, 1974, several hundred active troops (along with a few thousand veterans) overpowered the guards at the Trinity Tower and entered the Kremlin. They made their way to the Senate building, where the Premier was staying. The Premier was captured at 5:32 AM, and he gave a speech on Soviet television a few hours later. In this speech, he announced his resignation due to 'health reasons' and fled Moscow the following day. However, this would not be the last of Brezhnev, as his plane landed at a military base in Kazakstan that he had staffed with loyal allies in the case of him being overthrown.
Premier Brezhnev announces his resignation, January 18, 1974
However, the most immediate matter for most of the Soviet populace was who would be the new leader. The majority of the population only found out about this when it aired on TV, which was over a day after the coup occurred. As it turned out, there was a good reason for this. A few thousand soldiers and veterans had managed to overthrow one of the most powerful men in the world, but they didn't have someone within their ranks to take over the job. In the end, this problem was solved for them.
General Sergey Akhromeyev was a hardline military hero from the Sino-Soviet War, where he had commanded ground forces in the offensive to take back east Manchuria. When news of the coup came, he ordered the military to take control of the Kremlin, which was achieved within a few hours. He overwhelmed everyone within the walls and moved right in to the Premier's office.
Sergey Akhromeyev, Premier of the Soviet Union (January 18, 1974-)
During the next few days, while Akhromeyev consolidated his power, some of the Warsaw Pact states decided to take advantage of the chaos. On January 19, the Czech part of Czechoslovakia and major segments of Hungary revolted. The new premier had a difficult decision about what to do. In the end, however, he decided to take a hybrid approach:
Crush the hungarians and get rid of the Czechs.
It might seem odd that a communist hardliner would allow a country to choose its own fate, but the logic is actually sound. The revolt in Hungary was nation-wide, and needed to be crushed. The Czechs had a history of revolts and rebellion, and allowing them independence while crushing the Hungarians quietly would hopefully result in the west lifting sanctions, at least temporarily. As much as it pained the new leader to release Czechia, the survival of the union depended on it.
After all, it wouldn't be long until the people turned on him if he did nothing.