Pei Yan

At some point, Pei Yan passed the imperial examination,[2] and he was made the food storage officer at Pu Prefecture (濮州, roughly modern Heze, Shandong).

In spring 684, Emperor Zhongzong, despite Empress Dowager Wu's regency, attempted to assert some key personnel decisions of his own—trying to make his father-in-law Wei Xuanzhen (韋玄貞, the father of his wife Empress Wei) Shizhong, and also trying to give an office of the fifth rank (within the nine-rank Tang governmental structure) to his wet nurse's son.

Pei opposed both commissions, and Emperor Zhongzong, in frustration, stated, "What would be wrong even if I give the empire to Wei Xuanzhen?

She, in response, ordered Pei and fellow chancellor Liu Yizhi, as well as the generals Cheng Wuting and Zhang Qianxu, lead troops into the palace, and then issued an edict deposing Emperor Zhongzong and demoting him to the title of Prince of Luling, replacing him with his younger brother Li Dan the Prince of Yu (as Emperor Ruizong).

When Empress Dowager Wu consulted the chancellors, both Liu Yizhi and Wei Siqian were fearful and therefore did not dare to speak, but Pei strenuously objected, making her even more angry at him.

One of Li Jingye's key coconspirators was Pei's nephew Xue Zhongzhang (薛仲璋), which drew Empress Dowager Wu's suspicion.

He further told Empress Dowager Wu that if she returned authorities to Emperor Ruizong, the rebellion would, for the lack of a good point of propaganda, collapse on its own.

Empress Dowager Wu became more suspicious, and when the official Cui Cha (崔詧) heard this, he submitted a petition accusing Pei of treason.

Empress Dowager Wu had Pei arrested and had him interrogated by the imperial censors Qian Weidao (騫味道) and Yu Chengye (魚承曄).