Cao Ni (died September or October 323[2]) was a Chinese military general of Han-Zhao and warlord during the Jin dynasty (266–420) and Sixteen Kingdoms period.
Cao Ni left an important mark in 4th century China with the formation of Guanggu City (廣固, in modern Qingzhou, Shandong).
[5] However, the tides changed the following year in 311 as Cao Ni dealt him a decisive defeat, causing Gou Xi to abandon his campaign and flee to Gaoping.
The Jin capital of Luoyang fell to Liu Yao, Huyan Yan, and Wang Mi in July 311, while Gou Xi was captured by Shi Le in October.
He first took Wenyang Pass (汶陽關) and Gongqiu (公丘, in present-day northern Anhui and northwestern Jiangsu) after defeating and killing the Jin Administrator of Qi, Xu Fu (徐浮).
By 315, Cao Ni had conquered all of Qi and Lu and positioned his troops along the Yellow River, creating concerns for his rival warlord Shi Le.
[9] Between 312 and 315, it is said that Cao Ni uncovered the tombs of two Spring and Autumn period figures: the philosopher Guan Zhong and Duke Jing of Qi.
In 313, during his opposition towards Liu Cong's building projects, Chen Yuanda cited Cao Ni as a major concern along with Shi Le as the two men were decreasing their frequencies of sending tribute and reports.
Cao Ni wanted to make him Prefect of Ye County, but Su Jun pretended to be ill in order to avoid him.
As time passed by, Cao Ni grew worried about Su Jun, who was gathering a sizeable group of refugees under his wing.
Cao Ni planned to get rid of him in 319, but Su Jun learned about this and fled through the sea with his followers to Eastern Jin, where he became a prominent general but later a dangerous rebel.
In order to prevent further bloodshed, Ju Peng decided to flee to Liaodong in 319, leaving the people of Donglai under Cao Ni's administration and thus ending the conflict.
[18] Although Cao Ni died through capital punishment, at least a child or a grandchild of his managed to survive the aftermath of Shi Hu's attack.
Ju Peng believed that Wang Mi and Cao Ni had descendants living in Donglai, so he wrote to his son urging him to end their family feud.