直隸總督
During the First Sino-Japanese War, he mediated many of the negotiations between China and Japan, and was the chief draftsman of the Treaty of Shimonoseki that ended the war. In 1900, he was appointed as secretary general of the provisional government in Tientsin, China during the Boxer Rebellion, and then from 1902 to 1905 he served as the chief foreign adviser to the Viceroy of Zhili, Yuan Shikai.