Yuan Zi () (739 – July 19, 818), courtesy name Deshen (), formally the Duke of Huaiyang (), was an official and general of the Chinese Tang dynasty, serving briefly as chancellor during the reigns of Emperor Shunzong and Emperor Xianzong.
Background
Yuan Zi was born in 739, during the reign of Emperor Xuanzong. His family was from Cai Prefecture (蔡州, in modern Zhumadian, Henan). It traced its ancestry from a clan of Han dynasty officials, including Yuan An (who, however, was not a direct ancestor), with direct descendance through a line of officials of Han, Cao Wei, Jin dynasty (266–420), Liu Song, Liang dynasty, Northern Zhou, Sui dynasty, and Tang dynasty. His grandfather Yuan Zhixuan () served as a prefectural official, while his father Yuan Chu () served as a county magistrate.
Yuan Zi was said to be studious in his youth, and as his brother-in-law Yuan Jie (元結, note different surname) was already a prefectural prefect who had a good reputation, he lived with Yuan Jie while he studied. He interpreted the ancient works well, and Yuan Jie respected him. He later lived as a guest in the region of Jing Prefecture (荊州, in modern Jingzhou, Hubei) and Ying Prefecture (郢州, in modern Wuhan, Hubei) and taught students.
During Emperor Dezong's reign
Early in the Jianzhong era (780-783) of Emperor Xuanzong's great-grandson Emperor Dezong, the official Zhao Zan () recommended Yuan Zi as a hermit with abilities, and he was made a Xiaoshulang (), a scribe at the Palace Library. Yuan later served on the staffs of the generals Zhang Boyi () and He Shigan (). On one occasion, one of his subordinates was falsely accused of embezzlement, but Yuan was able to discover that the accusations were false and get him released. When the deputy chief imperial censor Wei Tao () heard of this, he recommended Yuan to be an imperial censor with the title Shiyushi (). Yuan later served as Gongbu Yuanwailang (), a low-level official at the ministry of public works (工部, Gongbu).
In 794, Nanzhao, which had previously been a Tang vassal but which had been a Tufan vassal for some time, reestablished a relationship with Tang based on communications between the Tang general Wei Gao and its king Yimouxun (), and Yimouxun offered Nanzhao's maps and local produce as tributes, and submitted the seal that Tufan's king had awarded him. Emperor Dezong sought an appropriate emissary to visit Nanzhao, and many officials found excuses to decline due to the length of the journey, but Yuan did not decline, causing Emperor Dezong to give him much praise. Emperor Dezong made him Cibu Langzhong (), a supervisorial official at the ministry of rites (禮部, Lǐbu), and sent him to Nanzhao as an emissary. Yuan, under Emperor Dezong's direction, bestowed a new Tang seal on Yimouxun. After his return, he was made Jianyi Daifu (), and then was made Shangshu You Cheng (), one of the secretaries general of the executive bureau of government (尚書省, Shangshu Sheng) and was put in charge of selecting officials at the ministry of civil service affairs (吏部, Lìbu, note different tone than the ministry of rites). He wrote a five-volume work, the Yunnan Ji (), about his journey.
Yuan was later made the prefect of Hua Prefecture (華州, in modern Weinan, Shaanxi), as well as the defender of Tong Pass and the commander of the Zhenguo Army (). His governance was said to be simple and lenient. When people came from other prefectures and wanted to settle in Hua Prefecture, Yuan gave them land and allowed them to settle. The people loved him for his mercy. However, it was also said that he did not punish people for crimes, and whenever he caught thieves, he would often release them or allow them to simply pay back what they stole. He was later recalled to Chang'an to be a general of the imperial guards, and when he was about to leave, the people of the prefecture tried to stop him on the road to prevent him from leaving. His successor Yang Yuling () had to publicly declare, "I, Yang Yuling, would not dare to alter the policies set by Lord Yuan." The people bowed to Yuan and allowed him to leave.
During Emperor Shunzong and Emperor Xianzong's reigns
Emperor Dezong died in 805 and was succeeded by his severely ill son Emperor Shunzong. Several months later, however, with Emperor Shunzong's illness, his son and crown prince Li Chun was made regent, and Yuan Zi was made Zhongshu Shilang (), the deputy head of the legislative bureau (中書省, Zhongshu Sheng). He was also given the designation Tong Zhongshu Menxia Pingzhangshi (), making him a chancellor, along with Du Huangchang. Emperor Shunzong soon passed the throne to Li Chun, who took the throne as Emperor Xianzong. Yuan continued to serve as chancellor.