Li Guyan (李固言), courtesy name Zhongshu (仲樞), was an official of the Chinese Tang dynasty, serving two terms as chancellor during the reign of Emperor Wenzong.
[2] In 812, during the reign of Emperor Xianzong, Li Guyan passed the imperial examinations as the highest scorer in the Jinshi class.
[5] In 831, when the chancellor Song Shenxi was falsely accused of treason (of wanting to overthrow Emperor Wenzong and replacing him with his brother Li Cou the Prince of Zhang) by the powerful eunuch Wang Shoucheng, Li Guyan was one of the advisory officials who urged that the investigation of the matter be transferred from the eunuch-controlled agencies to the imperial government-controlled agencies.
Li Guyan returned the edict to Emperor Wenzong, pointing out that someone who had been guilty should not serve on the crown prince's staff.
[5] Soon thereafter, Li Zongmin offended Emperor Wenzong over his attempt to defend the official Yang Yuqing (楊虞卿) against imperial wrath and was demoted and exiled.
[5] In fall 835, Zheng, as part of a plot he was forming with Emperor Wenzong and Li Xun to slaughter the eunuchs, sought to be the military governor of Fengxiang Circuit (鳳翔, headquartered in modern Baoji, Shaanxi).
[7] In 837, there was a discussion between Emperor Wenzong and the chancellors, in which Li Guyan advocated the merits of commissioning officials according to their abilities, rather than seniority.
[5] After Emperor Wenzong's death and succession by his younger brother Emperor Wuzong in 840,[8] Li Guyan was recalled from Xichuan to serve as You Pushe (右僕射), one of the heads of the executive bureau, but soon thereafter was sent out of the capital Chang'an again to serve the military governor of Hezhong Circuit (河中, headquartered in modern Yuncheng, Shanxi).