The Nian rebellion 捻 (modern expression Nianjun qiyi 捻軍起義), in Chinese known as the "Nian armies" (nianjun 捻軍) and by the Qing government 清 (1644-1911) called "Nian bandits" (Nianfei 捻匪), was a widespread uprising in eastern China during the mid-19th century. It consisted of many smaller, mostly uncoordinated insurgencies that occurred simultaneously to the much larger Taiping rebellion 太平 (1850-1864).
The word Nian goes back to a local expression from the Huaibei region 淮北 (northern parts of Jiangsu and Anhui provinces) meaning "fellows" or "comrades" (Zhang 1992: 737). Gangs of bandits (nianzi 捻子, niandang 捻黨) came up in the region in the early 18th century or even earlier. Their members were mostly farmers and craftsmen. In the early 19th century, some of these groups reached a size of several hundred members. They were active not just in northern Anhui and Jiangsu, but were also found in parts of the adjacent provinces of Henan and Shandong which their large communities of salt workers. Clashes with local military took place occasionally, but their frequency rose after 1850, perhaps under the influence of the Taiping movement that in 1853 conquered Nanjing and transformed the city into their "Heavenly capital" Tianjing 天京 (Nanjing 南京, Jiangsu).
The first northern campaign of the Taiping in 1854 was the moment when the various local Nian movements joined to form a Nian army of its own. The official formation of that unit took place in autumn 1855, when local contingents gathered at Zhiheji 雉河集 (today's Woyang 渦陽) in Bozhou 亳州, Anhui, to form an alliance under the leadership of Zhang Lexing 張樂行 (also known as Zhang Luoxing 張洛行, 1811-1863). The joint army was divided into five divisions, each with a specific banner. The chief commanders were Zhang Lexing (Yellow Banner), Gong De 龔得 (Gong Deshu 龔得樹, d. 1861, White Banner), Han Laowan 韓老萬 (Han Wanfeng 萬峰 or Langzi 狼子, d. 1862, Blue Banner), Su Tianfu 蘇天福 (d. 1863, Black Banner), and Hou Shiwei 侯士維 (Red Banner). Below the level of these divisions (zongqi 總旗) were regiments (daqi 大旗) and companies (xiaoqi 小旗). Members of each military unit usually had a common place or origin or were related by kinship which gave them a relatively high amount of fighting spirit and nourished comradeship. On the other hand, the fighting spirit was less effective when units left their homeland.
In early 1857, Zhang Lexing marched southwards to meet with the Taiping armies of Chen Yucheng 陳玉成 (1837-1862) and Li Xiucheng 李秀成 (1823-1864) in Huoqiu 霍邱 (Lu'an 六安, Anhui) and the Zhengyang Pass 正陽關 (Shouxian 壽縣, Anhui). Zhang promised to support the Taiping with Nian contingents, but under the condition that the army structure was not changed and Nian commanders retained their own authority. Later that year, a commander of the Blue Banner, Liu Elang 劉餓狼 (Liu Yongjing 劉永敬) decided to return to the north, a breach of faith for which Zhang Lexing punished him with execution. The greater part of the Nian contingents thereupon turned their backs on Zhang and marched back to northern Anhui. Only Zhang himself and Gong De stayed in southern Anhui, where they fought side by side with the Taiping against the Qing. A third group of Nian troops under the command of Sun Kuixin 孫葵心 (d. 1861) and Zhang Zongyu 張宗禹 (d. 1868?) engaged in battles north of their homeland, in Henan and Shandong, where they inspired many local uprisings of the common folks against the local elites. Local Qing units suffered many defeats against the Nian armies in the late 1850s. Zhang's troops, supported by the Taiping leader Chen Decai 陳得才 (d. 1864), even advanced far into the west and raided villages in Shaanxi.
In 1860, the Taiping invested Zhang Lexing as "Fertile King" Wowang 沃王.
Between September 1861 and May 1862, the strengthened Qing armies besieged two strongholds of the Taiping, namely Anqing 安慶 and Luzhou 廬州 (today's Hefei 合肥) in southern Anhui. Forced to focus on the defence of these two cities, the Taiping were not able any more to give support to the Nian armies, and the latter lost their military fortunes. In autumn 1862, the Mongol Qing commander Senggerinchen (Ch. Senggelinqin 僧格林沁, 1811-1865) thrusted into northern Anhui, and in March the next year took the Zhiheji, where the united Nian armies had once taken their shape. During the battle, Zhang Lexing was captured and executed.
The head of the Nian movement being gone, the various Nian armies remained scattered over a vast territory without central command. In May 1863, Zhang Zongyu met with Li Xiucheng in Tongcheng 桐城, Anhui, and both decided to focus their basis of activity to northern Anhui. Zhang Zongyu was invested by the Taiping as King of Liang 梁, and the Nian leader Ren Zhu 任柱 (Ren Huabang 任化邦, d. 1867) as King of Lu 魯. The title of "Fertile King" was passed on to late Zhang Lexing's nephew Zhang Zhuo 張琢 (Zhang Yujue 張禹爵, d. 1868).
In April 1864, the Nian leaders Zhang Zongyu and Ren Zhu met with the Taiping leaders Chen Decai and Lai Wenguang 賴文光 (1827-1868) in Henan, and promised the Taiping to support them in the defence of their capital Tianjing, yet Senggerinchen blocked their way to the south. Shortly later, in July 1864, Tianjing fell, and Chen committed suicide. Zhang, Ren, and Lai took their military contingents to the northwest and formed a new military basis in Henan under the leadership of Lai Wenguang. This newly formed army adopted some military tactics of the Taiping, like the transformation of infantry units into cavalry units, which allowed them quick raids and surprise attacks in the border region between Henan, Shandong, and Jiangsu. In may 1865, Lai's army defeated Senggerinchen in the Battle of Gaolouzhai 高樓寨 close to Caozhou 曹州 (today's Heze 菏澤), Shandong, and killed this Mongolian commander.
After the defeat of the Taiping, the Qing could throw their modernized military, the Hunan Army (Xiangjun 湘軍) and Anhui Army (Huaijun 淮軍) against the recalcitrant Nian. Commander Zeng Guofan 曾國藩 (1811-1872) bought western rifles and cannons and constructed an effective defence line south of the territory controlled by the Nian. From that line, he attacked the rebels. Yet in September 1866, the Nian crushed through the defence line at Jialu Creek 賈魯河 in western Henan. Zeng lost his post as Grand Minister Inspector-General (qinchai dachen 欽差大臣) and was replaced by Li Hongzhang 李鴻章 (1823-1901).
In October 1866, the Nian army split into two. The Eastern Nian Army (Dongjianjun 東捻軍) remained in the hands of Lai and Ren, while the Western Army (Xinianjun 西捻軍) came into the hands of Zhang Zongyu and Zhang Zhuo. The Eastern Army was able to defeat Liu Mingchuan 劉銘傳 (1836-1896), a commander of the Anhui Army. They planned to march westwards into Sichuan and Shaanxi to liaise with the Western Army. Yet in early summer 1867, Li Hongzhang was able to encircle them at the place where the Grand Canal joins the Yellow River, and defeated the Nian rebels. The rest of the Eastern Army was extinguished early the next year at Yangzhou 揚州, Jiangsu. Lai was executed. The Western Army, roaming in Shaanxi and Shanxi, decided to move more eastwards to Henan and Zhili 直隸 (today's Hebei). In early 1867, the two Zhang envisaged an attack on Beijing, but were not able to exert substantial military pressure. They moved south again and were finally encircled at Chiping 茌平, Shandong. Zhang Zongyu escaped to an unknown place, but Li Hongzhang and Zuo Zongtang 左宗棠 (1812-1885) annihilated the rest of the Nian armies.