[5] Xiliang served in various roles in Shanxi from 1876 to 1894, during which time he gained a positive reputation for his handling of the Northern Chinese Famine and his energetic implementation of Governor Zhang Zhidong's Self-Strengthening reforms.
[6] He was transferred to Shandong in 1894 where he served in the military secretariat during the First Sino-Japanese War and later in various administrative posts, generally receiving strong praise from his superiors.
[7] China's defeat in the war, tension between peasants and Christian missionaries, and the German seizure of Jiaozhou Bay led Xiliang to develop nationalist and anti-foreign sentiments.
[9] Nonetheless, Xiliang followed his Treaty obligations to protect missionaries and helped to capture and execute the remaining leaders of the anti-Christian Big Swords Society.
[7] After Cixi requested support from the provinces, Viceroy Zhang Zhidong granted Xiliang permission to lead about 5,000 soldiers north to defend Beijing from the Eight-Nation Alliance.
[3] In this role Xiliang made some progress towards rationalizing the bureaucracy and modernizing government services, but caused popular unrest by raising taxes to meet Henan's onerous contribution to China's indemnity payments.
[18] A popular movement had begun among Sichuanese students that wanted to connect their province to the rest of China's rail network before the route could be monopolized by foreign interests.
Xiliang was greatly alarmed when they managed to capture the town and kill the garrison commander, and he personally led a column of troops to drive the rebels out.
[27] Impressed by his handling of the crisis, Emperor Puyi's regent Zaifeng promoted Xiliang to the more prestigious post of Viceroy of the Three Northeast Provinces in 1909.
He attempted to take a hard diplomatic line against Japan and also to secure a loan from American financiers to build a non-Japanese railway, but was vetoed by Beijing in both cases.
In October 1910, he led 18 Governors and Viceroys in writing a telegram to the Court in support of the Advisory Council's call for a parliament and responsible cabinet.
[32] Prominent Chinese physician Wu Lien-teh said of Xiliang and the other officials helping combat the plague, "no finer or more courteous types of gentlemen existed in China.
He was recalled by the Imperial Court in October for advice on how to deal with the Wuchang Uprising, but he finally returned home for good the same day that Puyi abdicated, February 12, 1912.