China was a sickly country in the 19th Century, plauged by an ineffectual government, a weak and outdated military, and both internal and external threats. The so-called Taiping Rebellion of the 1850s and 60s was the most catastrophic of several internal revolts that wreaked havoc on the internal stability of the Qing Empire.
The Taiping movement began in 1846 in Kwangsi province, when a nominal (and potentially mentally ill) convert to Christianity, Hung Hsiu-ch'uan, decided that he was Jesus Christ's younger brother, and had a 'Mandate of Heaven' to rule China. This birthed one of a number of bizarre fusions of Christianity and 'native' beliefs that commonly arose on account of 19th Century imperialism.
It also birthed a war of horrifying proportions. In January of 1851 Hung proclaimed his T'ai-p'ing T'ien Kuo - 'Heavenly Kingdom of Great Peace' - and declared himself the Heavenly King. He thus became head of a revolt that more closely resembled a civil war; members of ethnic and cultural minorities in China like the Hakka and the non-Han Zhuang joined him, as did disaffected Christians and even western mercenaries, who attempted to drill some of his troops to European standards.
Hung perished during the Imperial siege of Nanjing in 1864, and this is considered the nominal end of the rebellion; sporadic resistance did not end until 1871. When all was said and done, no less than 20-30 million Chinese had gone to their graves because of Hung; most were killed by plague and famines induced by the War, but the conflict was also full of battlefield slaughters, executions, and purges of villages. It is modernly believed to have been the most costly war in human history until the Second World War.