Xuanye is the third son of Emperor Shunzhi and his biological mother is Tong Jia. He suffered from smallpox in his childhood, which is said to be one of the reasons why Emperor Shunzhi chose him to succeed him. He ascended the throne at the age of eight in 1661. He was assisted by four ministers, Sony, Suksaha, Ebilong and Ao Bai, and was supported by his grandmother Xiaozhuangtaihuangtaihou. Ao Bai was domineering during the period of auxiliary administration. In 1669, 16-year-old Xuan Ye designed to capture him and truly took control of the political power.
After taking office, he made San Francisco, river affairs, and water transportation his top priorities. In 1673, he ordered the withdrawal of the vassal, and it took eight years to quell the rebellion of Wu Sangui and other three vassals; in 1683, Shi Lang was sent to attack Taiwan, and the Taiwan Prefecture was established the following year. He besieged Yaksa twice, signed the Treaty of Nerchinsk with Russia, personally conquered Ga Erdan three times, and sent troops to Tibet to expel the Junggar forces. Internally, we attached great importance to the management of the Yellow River and canals, and made six southern tours, declaring that "we will never increase taxes to breed more people", and the social economy was restored and developed.
Xuan Ye was diligent in his studies. He not only admired Cheng-Zhu Neo-Confucianism, but also learned astronomy, mathematics and medicine from missionaries. He organized the compilation of "Kangxi Dictionary" and "Complete Tang Poems", and presided over the actual survey of "Comprehensive Map of the Imperial Palace". In his later years, the battle for the throne became fierce. He deposed Crown Prince Yin Reng twice, and the princes formed cliques to fight. The administration of officials became increasingly lax, and the treasury suffered a serious deficit. In the winter of 1722, he died of illness in Changchun Garden. He was succeeded by the fourth son of the emperor, Yinzhen, and was buried in Jingling.
Xuanye is the longest reigning emperor in Chinese history. He pacified the Three Feudatories, unified Taiwan, fought against Tsarist Russia, and contained Junggar, and established the basic pattern of Qing Dynasty's multi-ethnic unified country; he made light of corvee and low taxes, regulated rivers and canals, and revived the social economy from the wars during the Ming and Qing Dynasties. He was enthusiastic about studying Western learning, but did not promote it in society. In his later years, official governance was lax and competition for positions was fierce. The Nanshan Collection Case also opened the forerunner of the Literary Prison in the future, leaving many disadvantages for his successors.