 In 1836, he became prefect of Xunzhou in Guangxi province.During his tenure as a prefect Xu Jiyu submitted a number of official memorials on domestic reform, which impressed the Daoguang Emperor and further helped Xu to rapidly rise through the ranks of the Qing civil service.Following the outbreak of the First Opium War, Xu was appointed circuit intendant of a coastal prefecture in Fujian province, where he witnessed the war with his own eyes, an experience that convinced him that China needed to learn more about the West.