In this essay, I’ll tell you a bit about early seeds of democracy in China during the period 1900-1949. Contrary to popular belief, this period was surprisingly modern and open. It starts towards the end of the Qing dynasty (大清, 1644-1912), goes through Republic of China (中華民國, 1912-1949*), and ends with Mao's People’s Republic Of China (中華人民共和國, 1949-).
This period - as well as the half century before - saw an increase in western influence. Militarily, this started with the British defeating China in the Opium War (1842) and the following Treaty of Nanjing, after which many events followed (another Opium War, more treaties, Sino-Japanese war, suppression of Boxer uprising, etc). This meant that there were treaty ports that were under foreign control by the French, British, Japanese, United States, etc. The former great Chinese empire lost a lot of its power. The current PRC government calls this the Century of humiliation (百年耻辱, 1842-1949).
Whether guns or books came first, this was also accompanied by an increased interest in western ideas. Western books were translated, a lot of them via Japanese. For example, Yan Fu (嚴復, 1854-1921) translated classics by people such as Darwin, Adam Smith, John Stuart Mill, Herbert Spencer, Montesquieu, etc around the turn of the century. 
Before these translations, certain Western concepts such as freedom or liberty didn’t exist. Ziyou (自由) came from a translation of John Stuart Mill’s On Liberty (possibly as a loan word via Japanese). The story is more complex than that, where concepts don’t always naturally map, and during e.g. Song dynasty the phrase appears to have been used, but without the political connotations.
A lot of this interest in Western ideas came from local individuals and merchants who perhaps were educated in the west and lived in Shanghai and similar treaty ports. Many of them were standing with one foot in Chinese culture and one in Western, and found ways to reconcile these, sometimes compatible sometimes contradictory, systems of thinking. They didn’t see Chinese culture as being incompatible with democracy. Instead, they faulted politics, specifically one party rule and civil strife. .
Due to wars and foreign intervention, the central government was fairly weak. However, in many places the local and provincial government was more powerful. In Chinese governance, like in many other countries, there is a clear distinction between the local, provincial and national levels.  This era, with a weak national government, is often called the Warlord Era (軍閥時代).
The term ’warlord’ brings images of military autocrats, chaos and mayhem. While there is some truth to that, the term itself was often used as a form of propaganda. Warlordism or militarism internally in China was linked to Western imperialism. 
Looking at casualties between major wars during 1917-1930, there were 400,000 deaths. This might seem like a lot, but China has a big population, and this was spread out over a long period of time. Rawski estimates that deaths from all causes at the time was 13.5 million per year, which means only one out of 500 deaths occurred on the battle field.  This should also be compared with the 20m+ deaths during rebellions in 19th century, or millions killed during Mao era.
Hu Shih (胡適, 1891-1962), a famous philosopher and diplomat who studied in the US with John Dewey (school of pragmatism), noticed that a lot of the violence during the Warlord Era came from attempts to unify China from above.
In a country as large as China, no matter how strong an order imposed from the centre, it would eventually produce division; well-run, self-administered localities, he believed, could knit the country together. 
In other words, a voice for pragmatic localism and self-governance.
While explaining the origins of the Nationalist Party (KMT, 國民黨) and Communist Party (CCP, 中國共產黨) is not part of this essay, their names are pretty self-explanatory. They were both against Western imperialism, in their own way, and were trying to fill the gap after the Qing empire. There is an idea of 'revolution as history' where we focus largely on the history of revolutions and their proponents. Often these people are less important than they might appear. It is easy to look at this period and focus only on the Nationalist Party and Communist Party, but there were many other people and ideas that don’t fit neatly into this two party divide. They had their own interests, and had a big impact in terms of driving ideas of freedom and democracy. 
In the early years during the twentieth century, several places in China had various forms of local elections.
Shanghai saw early democratic institutions in the form of a city council, which was outside of the Shanghai’s International Settlement.  In 1907, the Shanghai General Works Board extended voting rights to everyone who was a resident for more than five years and paid a minimum amount of local taxes. This followed similar events in Tianjin City council elections the year prior. 
In 1909 China held elections with an elite of two million people. This was later expanded in 1912 to 40 million people. Fincher writes:
these freely contested, and at the time, well reported elections produced representative assemblies which ended the world’s oldest monarchy, proclaimed Asia’s first republic, and practiced liberal democracy. 
He later continues:
as measured by electorate size, the Chinese polity had advanced in 1909 from the standard set in the Japanese election of 1890 of slightly more than 1 percent (of a population of 40 million) to slightly less than 2 percent (of 400 million). In 1912 the Chinese polity achieved a standard (10 per cent of 400 million) which Japan did not reach until 1928, in the first election to follow implementation in Japan of universal male suffrage. 
Not all roses
Sun Yat-Sen (孫中山, 1866-1925) was the first leader of KMT, and the first president of the Republic Of China. He was well-read on the European Enlightenment and Chinese culture and attempted to bridge them in his own way. The plan was to have the "Nationalist revolution" in three phases, with the first being a violent unification of China, and the last being democratic constitutional rule.  Unsurprisingly, they didn’t get to the latter phase.
One of the most important features of democracy, to be able to vote people out of office and keep them accountable with a rule of law, was missing from the very start:
He left no notion as to how Chinese politics should be institutionalized, for his thought on public administration did not include ways of preventing those in authority from abusing their powers 
As Chiang Kai-shek (蔣中正, 1887-1975) eventually took over, it became more like a personal dictatorship with everything you’d expect from such a regime.  There was one upside though. Unlike the communists, with the Nationalist government intellectuals could enjoy the freedom of silence. Generally speaking, intellectuals survived the Nationalist rule, unlike during CCP's rule. 
For whatever reason, liberal opposition and the third force failed. The CCP took over China, and KMT ended up in Taiwan (台灣). In Taiwan, more measures were taken, and it failed there as well. For a while, until it succeeded. But that’s a story for another time.
Continuum or aberration?
Should we look at the current CCP government as a continuation of great empires, as they would like to see themselves, or something else?
Europe had kings and monarchies for a long time before modern democracy developed during the last few hundred years. As people get exposed to more ideas, we see which forms of governance works better. While progress isn’t linear or even necessarily a well-defined thing, useful systems tends to survive and fragile systems die out.
This is one of the reasons why you can't talk about e.g. Taiwan in mainland China. Many would argue that the CCP is afraid of its own people, and Taiwan shows what "Chinese democracy" might look like.
We can look at the period from 1900 to 1949 as an intermission, or at the current regime as an aberration that is going against a global trend that has been unfolding over hundreds of year. Only time will tell.
- Fung, p 13
- Fincher, p 12
- Dikotter, p 8
- Rawski, p 36-37
- Dikotter, p 9; also see Shih
- Dikotter, p 18; also see Fung
- Fung, p 3
- Fincher, p 41-42
- Fincher, p 4
- Fincher, p 270
- Fung, p 30
- Fung, p 38
- Fung, p 50
- Fung, p 45, including footnote 65 with a quote from Hu Shi
- Dikotter, Frank, and Frank Dikötter. The age of openness: China before Mao. Univ of California Press, 2008.
- Fung, Edmund SK. In search of Chinese democracy: civil opposition in Nationalist China, 1929-1949. Cambridge University Press, 2006.
- Rawski, Thomas G. Economic growth in prewar China. University of California Press, 1989.
- Fincher, John H. Chinese Democracy: Statist Reform, the Self-Government Movement and Republican Revolution. Institute for the Study of Languages and Cultures of Asia and Africa, 1989.
- Scwartz, Benjamin. In search of wealth and power: Yen Fu and the West. Vol. 16. Harvard University Press, 2009.
- Shih, Hu. English Writings of Hu Shih (Vol 1-3). Springer Science & Business Media, 2013.