Liu Heita (Chinese: 劉黑闥) (died c.March 623[1]) was an agrarian rebel leader during China's transition period from the Sui dynasty to the Tang dynasty, who initially successively served under Hao Xiaode (郝孝德), Li Mi, and Wang Shichong.
He was from Zhangnan (漳南, in modern Handan, Hebei)—the same county as Dou Jiande—and was said to be brave and quick in reaction from his youth.
In 619, Liu was serving in the army of Wang's newly established state of Zheng (as Wang had the final Sui emperor, Yang Tong, yield the throne to him earlier that year), defending Xinxiang (新鄉, in modern Xinxiang, Henan), when he was captured by Li Shiji, a Tang dynasty general who had been forced to submit to and serve Dou's state of Xia.
He often had Liu command guerilla forces to make surprise attacks, and sometimes covertly entering enemy territory for intelligence purposes.
In 621, with Wang Shichong's state of Zheng under attack by the Tang general Li Shimin the Prince of Qin (the eventual Emperor Taizong) and in desperate straits, Dou Jiande believed that if Zheng were destroyed by Tang, his own Xia state would be cornered.
However, subsequently, Dou was executed by Emperor Gaozu of Tang (Li Shimin's father).
Liu defeated Li Shentong, however, at Raoyang (饒陽, in modern Hengshui, Hebei).
He also entered into an alliance with another agrarian leader, Gao Kaidao the Prince of Yan, as well as the Eastern Turks (Dongtujue).
Li Yi was coming from the north and the two Tang generals planned to capture the northern road from the Yellow River through Mingzhou to Yuzhou (Beijing), combining their forces and isolating the rebels from their Turkish allies.
Liu was able to flee with his general Wang Xiaohu (王小胡), but Handong defenses otherwise collapsed.
Liu fled to the Eastern Turks (Dongtujue), and Handong territory fell into Tang hands.
In the middle of the feast, however, Zhuge ambushed him and his guards, capturing them and delivering them to Li Jiancheng.