The Taiping reform movement occupies and makes Nanjing its capital until 1864.
The Taiping Rebellion, also known as the Taiping Civil War or the Taiping Revolution, was a massive rebellion and civil war that was waged in China between the Manchu Qing dynasty and the Han, Hakka-led Taiping Heavenly Kingdom. It lasted from 1850 to 1864, although following the fall of Tianjing (now Nanjing) the last rebel army was not wiped out until August 1871, and the rebellion would inspire further uprisings such as the short-lived Heavenly Kingdom of the Great Mingshun in 1903, which was directly inspired by the Taiping. After fighting the bloodiest civil war in world history, with 20 to 30 million dead, the established Qing government won decisively, although at a great price to its fiscal and political structure.
The uprising was commanded by Hong Xiuquan, an ethnic Hakka (a Han subgroup) and the self-proclaimed brother of Jesus Christ. Its goals were religious, nationalist, and political in nature; Hong sought the conversion of the Han people to the Taiping's syncretic version of Christianity, to overthrow the Manchu-led Qing Dynasty, and a state transformation. Rather than supplanting the ruling class, the Taipings sought to upend the moral and social order of China. The Taipings established the Heavenly Kingdom as an oppositional state based in Tianjing and gained control of a significant part of southern China, eventually expanding to command a population base of nearly 30 million people.
For more than a decade, Taiping armies occupied and fought across much of the mid and lower Yangtze valley, ultimately devolving into total civil war. It was the largest war in China since the Ming-Qing Transition, involving most of Central and Southern China. It ranks as one of the bloodiest wars in human history, the bloodiest civil war, and the largest conflict of the 19th century. In terms of deaths, the civil war is comparable to World War I. 30 million people fled the conquered regions to foreign settlements or other parts of China. The war featured extreme brutality on both sides. Taiping soldiers carried out widespread massacres of Manchus, the ethnic minority of the ruling Imperial House of Aisin-Gioro. Meanwhile, the Qing government also engaged in massacres, most notably against the civilian population of the Taiping capital, Nanjing.
Weakened severely by an attempted coup (the Tianjing incident) and the failure of the siege of Beijing, the Taipings were defeated by decentralized, irregular armies such as the Xiang Army commanded by Zeng Guofan. Having already moved down the Yangtze River and recaptured the important city of Anqing, Zeng's Xiang Army besieged Nanjing during May, 1862. Two years later, on June 1, 1864, Hong Xiuquan died and Nanjing fell during the Third Battle of Nanjing, barely a month later. The 14 year civil war together with other internal and external wars around the same time greatly weakened the Qing dynasty, which would collapse less than 50 years afterwards. It exacerbated sectarian tension and accelerated the rise of regionalism as both the rebellions and the Qing government relied on civil militia corps known as Tuanlian, foreshadowing the Warlord Era, that would come after another Hakka, Sun Yat-Sen, overthrew the Qing in the 1911 Xinhai Revolution, yet failed to control these local militia groups following the death of Yuan Shikai after the succeeding establishment of Republic of China.