By the end of the Second World War, Chinese economic and political power was in ruins.
The Japanese had invaded large parts of the country leaving the central government weak. This was followed by many foreign powers developing their own enclaves in the country and running virtual colonies.
The communist party took an opportunity of a weak central government and launched a violent campaign, culminating in a civil war.
Mao was popular among the rural farmers and the poor who served in the People's liberation army.