The historical origins of the Communist Party of China lie in the heroic struggles of the peasants throughout Chinese history who have been the driving force behind China's development and progress. The immediate precursors were the revolutionary democratic Taiping Rebellion and the anti-imperialist Boxer rebellion.
The organizational precursor to the CPC was The Tongmenghui (Chinese: 中國同盟會; Pinyin: Tóngménghuì; Wade-Giles: T'ung-meng Hui; lit. United Allegiance Society), also known as the Chinese United League or the Chinese Revolutionary Alliance, was a secret society and underground resistance movement organized by Sun Yat-sen and Song Jiaoren in Tokyo, Japan, on 20 August 1905. This new alliance was created through the unification of Sun's Xingzhonghui, or Revive China Society, the Guangfuhui, or Restoration Society, and other Chinese revolutionary groups.
Combining republican, nationalist, and socialist objectives, the Tongmenghui's political platform was "To expel the northern barbarians and to revive Zhonghua, to establish a republic, and to distribute land equally among the people." (Chinese: 驅除韃虜，恢復中華，創立民國，平均地權)
After the 1911 Populist Revolution, Comrade Mao Zedong and his associates gained influence in the party which was renamed the Chinese Populist Party, inspired by the American Populists led by William Jennings Bryan, and the Russian Populist and Narodnoik traditions. In 1912 the PPC became an official associate of the Second International. The three main factions within the Populist Party were
1) The Populists which drew their support mainly from the peasants, and were inspired by the Chinese tradition of peasant uprisings as well as the works of Utopian socialists and anarchists like Kropotkin.
2) The Social Democrats, whose strength lay in the infant proletariat and the intellectuals. They mainly followed the orthodox Marxism of the Second International. Delegates from the Chinese Populist Party attended the 1912 Basel Congress, and supported Lenin at the 1915 Zimmerwald Conference.
3) The Nationalist Faction, which drew support from the national bourgeoisie, wanted to revive China's great power status and looked to the German and Meiji Japanese models for inspiration.
Sun Yatsen resigned his role as party chairman after becoming President of the Chinese Popular Republic. The young revolutionary hero Mao Zedong succeeded him as Chairman in 1912. Mao sided with the Social Democratic faction during his stay in Shanghai but criticized the mechanical foreign Marxism of the Second Internationalists, instead he called for a Marxism adapted to concrete Chinese conditions. During the Long March, Mao inspired the peasants to rise up and seize the lands of the landowners. Land reform was carried out in a manner inspired by the Chinese Kropotkin faction. Mao was able to unite the rural anarchists and the urban social democrats into a unified worker-peasant alliance. The Chinese people were outraged by the betrayal of the Second International in supporting the Great Imperialist War. Following the outbreak of the war, the Bolshevik anti-imperialist faction inspired by Lenin's call to turn imperial war into class war, became the dominant faction among the workers, peasants and patriotic bourgeoisie. Mao led a campaign by the Chinese Bolsheviks to attack revisionism within the party and to reorganize the party along Leninist lines as put forward in What is to be Done? The Chinese Bolsheviks played an important role in organizing the Shanghai Commune in the aftermath of the Russian October Revolution.