In 1925, when Shaanxi came under the control of warlord Feng Yuxiang (Feng Yü-hsiang), the provincial forces were reorganized as National Army's Third Army, with Yang as commander of its 3rd Division. After Feng declared allegiance to Jiang Jieshi (Chiang Kai-shek) in September 1926, the National Army became the Second Army Group of the GMD National Revolutionary Army, with Yang commanding its Tenth Army and the Eastern Route in the 1926–1928 Northern Expedition. When Feng-Jiang cooperation broke down in early 1929, Yang turned to the Nationalists, with his troops reorganized and himself as commander of the new 14th Division, stationed at Nanyang in Henan (Honan). In mid-1930, Yang, as commander of the Seventh Army and the Punish-the-Rebel Army's Seventeenth Route Army, marched into Shaanxi to crush Feng's elements, and at year's end, he occupied Xi'an (Sian).
During his Xi'an years, Yang served as governor (1931) and pacification commissioner (1932–1936) of Shaanxi, while continuing in the command post of the Seventeenth Route Army. Meanwhile, he grew increasingly dissatisfied with Jiang's nonresistance toward Japanese aggression in north China, which he had been following since September 1931. Beginning in late 1935, Yang opened communications with Zhang Xueliang (Chang Hsüeh-liang), commander of the Nationalist Northeastern Army and the Chinese Communists, who had just arrived at Yan'an (Yenan) in northern Shaanxi after the 1934–1935 Long March.
These talks led to the Xi'an Incident of December 1936. On 12 December, Yang and Zhang arrested Jiang, who had gone to Xi'an a week earlier to discuss the anti-Chinese Communist "extermination campaign" and compelled him to negotiate with the Chinese Communists for a common anti-Japanese policy. The discussion between Jiang and the Chinese Communist delegation, led by Zhou Enlai (Chou En-lai), resulted in a Nationalist–Chinese Communist united front. On 25 December, Jiang was released and flew back to Nanjing (Nanking) in Jiangsu (Kiangsu), accompanied by Zhang, who never returned.
On 5 January 1937, Jiang removed Yang from his official posts and sent him on a tour of Europe and the United States in June. When Yang returned to China and arrived at Nanchang in Jiangxi (Kiangsi) on 30 November, he was arrested and detained by GMD authorities; he was held throughout the Sino-Japanese War and the Chinese Civil War. On 17 September 1949, Yang was shot by GMD special agents who were about to evacuate to Taiwan, in their headquarters in Chongqing (Chungking), Sichuan (Szechwan). In February 1950, in honor of his patriotism, the Chinese Communists located his remains and shipped his body back to Xi'an for burial.
Liang Zhongming. Yang Hucheng Yu Xi'an Shiban (Yang Hucheng and the Xi'an Incident). Xi'an, China: Sanqin Chubanshe, 1996.; Mi Zanchen. The Life of General Hucheng. Trans. Zhao Wang. Hong Kong: Joint Publishing, 1981.; Wu Tien-wei. The Sian Incident: A Pivotal Point in Modern Chinese History. Ann Arbor: University of Michigan, 1976.