In May 1929, Deng Xiaoping, Zhang Yunyi, Li Qian, and Ye Jizhuang went to Guangxi to carry out the revolutionary struggle. Zhang Yunyi served as the captain of the 4th Brigade of Guangxi Police Force and the commander of the Nanning Police Force. With his identity as the commander, Zhang Yunyi took charge of Nanning's treasury and armory. On December 11, under the leadership of the Communist Party of China (CPC) Guangxi Front Committee headed by Deng Xiaoping, Zhang Yunyi led the troops to announce the uprising in Baise, Guangxi, and established the 7th Army of the Chinese Workers' and Peasants' Red Army. Serving as the army commander, Zhang Yunyi established the Soviet Government of the Youjiang River and the revolutionary base of the Youjiang River.
On September 22, 1949, the CPC Central Committee appointed Zhang Yunyi as the Second Secretary of the South China Branch of the CPC Central Committee, the Secretary of Guangxi Provincial CPC Committee and the chairman of Guangxi Provincial Government. At that time, Guangxi is economically backward, and the ferocious bandits were rampant there. The people were living in an abyss of misery. After Zhang Yunyi took office, facing the harrowing sufferings of the people, he immediately set the main task of "eliminating bandits and special agents, reinforcing the security, and mobilizing the masses". In just two years, there were more than 470,000 bandits and special agents exterminated in Guangxi, bringing people back to peace and providing a peaceful social environment for Guangxi's development.
张云逸与广西
1929年5月,邓小平、张云逸、李谦、叶季壮到广西开展革命斗争,张云逸出任广西警备第四大队大队长兼南宁警备司令。张云逸利用南宁警备司令的身份,接管南宁的银库和军械库。12月11日,在邓小平为首的中共广西前委领导下,张云逸率部在广西百色宣布起义,成立中国工农红军第七军,张云逸任军长,成立右江苏维埃政府,开辟了右江革命根据地。
1949年9月22日,中央任命张云逸为中共中央华南分局第二书记,并担任中共广西省委书记兼省政府主席。彼时,广西的经济十分落后,而且悍匪十分猖獗,人民生活在水深火热之中,苦不堪言。张云逸上任后,面对百姓的苦难痛心不已,当即确立了“清剿匪特,巩固治安,发动群众”的中心任务。短短两年间,广西共剿灭匪特47万余人,人民重新获得了安宁,同时也为广西的发展提供了和平的社会环境。