Pei Yan (裴炎) (died November 30, 684), courtesy name Zilong (子隆), was an official of the Chinese dynasty Tang Dynasty, serving as a chancellor during the reign of Emperor Gaozong, as well as regency by his wife Empress Wu (later known as Wu Zetian) over their sons Emperor Zhongzong and Emperor Ruizong. He was well trusted by Emperor Gaozong and Empress Wu late in Emperor Gaozong's reign, but drew Empress Wu's ire after he advised her, then empress dowager, to end her regency and return power to Emperor Ruizong. In 684, she accused him of treason and executed him.
Pei Yan was from Jiang Prefecture (絳州, part of modern Yuncheng, Shanxi), and it is not known when he was born. When he was young, he became a student at the imperial university, and it was said that during vacations, the other students would often go out to travel, but Pei kept studying. After he studied at the university for more than a year, he was due to be recommended for an official post, but he declined the recommendation on the basis that he felt that his studies were not done, and he ended up studying for more than 10 years at the university, particularly gaining expertise in the Zuo Zhuan and the Book of Han.
At some point, Pei Yan passed the imperial examination, and he was made the food storage officer at Pu Prefecture (濮州, roughly modern Heze, Shandong). He eventually served successively as assistant imperial censor, imperial archivist, deputy minister of defense, and eventually Huangmen Shilang (黃門侍郎) -- deputy head of the examination bureau of government (門下省, Menxia Sheng). In 680, he was given the designation of Tong Zhongshu Menxia Sanpin (同中書門下三品), making him a chancellor de facto. Later that year, when Emperor Gaozong's crown prince Li Xian was accused of treason, Emperor Gaozong had him, Xue Yuanchao, and Gao Zhizhou investigate. Eventually, Li Xián was deposed and replaced by his brother Li Zhe.