Xue was one of the most effective nationalist commanders of the Northern Expedition, serving as the commander of the 1st Division of the 1st Army. After the April 12 Incident, he recommended that Chiang Kai-shek be arrested as a counterrevolutionary. Purged from the 1st Army, Xue returned to Guangdong to serve as a divisional commander under Li Jishen. After political turmoil that saw Chiang return to power, Xue joined Zhang Fakui and served in the Guangdong 4th Army. During the Guangzhou Uprising, Xue's troops were called into the city to help suppress the Communists. Due to losses suffered over the course of the latter part of 1927, the 4th Army accepted Chiang's offer to reorganize. However, internal divisions saw newly appointed commander Miao Peinan forced out and Zhang Fakui's return as commander of the Guangdong 4th Army. Xue was promoted to become Zhang's deputy.