Zeng Guofan had been encouraged by Cheng：“You could learn from Zhang GuoLiang, who defended the Jiangnan bravely before he died. Go ahead!” This reportedly inspired Cheng to adopt the tactic of attacking whenever and wherever possible. He was promoted to Lieutenant General in October 1862 (defended Shanghai, see Battle of Shanghai (1861)), and he created the first Chinese rifle troop in September 1862. He retook the cities of Taicang, Kunshan, Wujiang and was promoted to Captain General in May 1863. He also formed the first modern Chinese artillery unit. Cheng Xuechi was awarded a first class merit medal for retaking Jiangsu and 20 cities and defending Shanghai twice in two years. Li Hongzhang reported to Tongzhi Emperor．
In 1864, after laying siege to the city of Jiaxing for a month, he decided to find a way to end the siege. By utilizing thousands of kilograms of explosives, a breach was opened in the walls. He ordered his troops to immediately storm the city through the breach. As he led the charge up the ruined walls, a bullet struck him in the head. It was said that even after being shot he continued the charge. However, after a week he died from his wounds. It was reported that he was content with his approaching death, finally being able to join his wife and sons in the afterlife (his family had been killed four years earlier by Taiping rebels). When Li Hongzhang reported to the Tongzhi Emperor that Cheng had died, both men began to weep.