In the first year of the Jiaqing Emperor's reign, he was appointed as the secretary of defense.
In Ji Yun's late life, he was inspired by Pu Songling's Liaozhai Zhiyi to compile his own collections of remarkable tales, many of which were held to be satirical portraits of prominent Neo-Confucian scholars.