He began his career as an army secretary at Li Hongzhang's camp in Anqing, Anhui province during the Taiping Rebellion, who served Li the longest, from 1860 to Li's death in 1901.[2] In 1902 he became governor of Shantung Province. The New York Times described him as "able and progressive" and noted his "pro-foreign views".[3]