In 1859 (Xianfeng 9th Year), during the Taiping Rebellion, he built his hometown's army, encouraged people to join, and suppressed several rebellions of the Taiping Army. In 1861 (Xianfeng 11th Year), he led about 500 men to join Li Hongzhang's Huai Army. He was made the head of Ming Camp (), and went with Li to Shanghai to aid Charles George Gordon's army in defeating the Taiping Army. There he learned the use of Western firearms. In 1864 Huai Army commander Li Hongzhang and vice commander Liu attacked Changzhou to recover the city. Major General Liu was promoted to Colonel General and appointed to defend the capital at Beijing.