Rubuta ci gaba don wannan sakin layi - Tun daga wannan lokacin, Duanfang ya ɗauki matsayin alƙalin lardin Shaanxi, kwamishinan gudanarwa, da wakilin gwamnan Shaanxi. A shekara ta 1900, bayan da sojojin Kasashen takwas suka mamaye Beijing bayan yakin Beijing
, Empress Dowager Cixi da Sarkin Guangxu sun gudu zuwa Shaanxi. An sauya Duanfang zuwa wani sabon mukami a matsayin kwamishinan gudanarwa na lardin Henan, sannan kuma ga gwamnan Hubei. A shekara ta 1902, Duanfang ya yi aiki a matsayin mukaddashin mataimakin sarki na Liangjiang, Bayan haka, an canza shi zuwa sabon mukami a matsayin Gwamnan Hunan. A cikin mukamansa na gaba, ya karfafa ɗalibai su yi karatu a ƙasashen waje, wanda aka sani da mutum mai wayewa, "mai himma a cikin ƙwarewa a harkokin waje da na cikin gida".