Traveling through Cheng Yongyan, he was secretly established as the crown prince in the thirty-eighth year of Qianlong (1773). In the fifty-fourth year (1789), he was named Prince Jia. In September of the 60th year (1795), he was officially declared the crown prince. On the first day of the first lunar month of the second year, he accepted the Zen throne of Emperor Qianlong and became the emperor. Afterwards, the government was still controlled by the Supreme Emperor Qianlong, and Yong Yan temporarily lived in Yuqing Palace. After the death of Emperor Qianlong, he began to rule personally. Facing the crisis-ridden political situation in the last years of Qianlong's reign, Emperor Jiaqing took up the banner of "Xian and Reform" to rectify internal affairs and clean up discipline. He killed the powerful minister He Shen, and deposed and imprisoned He Kun's closest confidants. The imperial edict sought to speak out, open up the avenues for speech, dispel evil and strengthen righteousness, and praise officials who had been convicted of speech offenses in the Qianlong Dynasty.