He was killed in a purge of high-level Tang officials by the warlord Zhu Quanzhong the military governor (Jiedushi) of Xuanwu Circuit (宣武, headquartered in modern Kaifeng, Henan), who was then preparing to seize the throne.
His grandfather Pei Xiang (裴向) served in a number of important imperial offices, including as the chief judge of the supreme court.
[1][7] It was only after he accompanied Emperor Yizong's son and successor Emperor Xizong on the flight from Chang'an to Chengdu (due to the attack on Chang'an by the major agrarian rebel Huang Chao in 880)[8] that, at the recommendation of the deputy chief imperial censor Li Huan (李煥) that he was made a censor with the title Duanzhong Shi Yushi (殿中侍御史).
[1] After Kong was removed from his position in 891 after a failed campaign against the warlord Li Keyong the military governor of Hedong Circuit (河東, headquartered in modern Taiyuan, Shanxi), Pei was also demoted, as a result, to be Taizi You Shuzi (太子右庶子), a member of the Crown Prince's staff — an entirely honorary position as there was no crown prince at that time.
[1] After being forced to surrender She Prefecture to the warlord Yang Xingmi the military governor of Huainan Circuit (淮南, headquartered in modern Yangzhou, Jiangsu) in 893,[9] Pei was recalled to the imperial government to serve as You Sanqi Changshi (右散騎常侍), a high-level advisory official at the legislative bureau of government (中書省, Zhongshu Sheng).
[1] When Emperor Zhaozong was forced to abandon Chang'an and flee to Hua Prefecture (華州, in modern Weinan, Shaanxi) in 896 due to an attack by Li Maozhen the military governor of Fengxiang Circuit (鳳翔, headquartered in modern Baoji, Shaanxi),[10] Pei followed the emperor to Hua Prefecture, and was subsequently sent as an imperial emissary to Xuanwu.
[1] In spring 901, shortly after Emperor Zhaozong was deposed in a coup led by the eunuch Liu Jishu and then restored in a countercoup, Pei Shu was made deputy minister of census (戶部侍郎, Hubu Shilang) and chancellor, with the designation Tong Zhongshu Menxia Pingzhangshi (同中書門下平章事).
[11] In 903, after Zhu had defeated Li and forced him to surrender the emperor, Emperor Zhaozong returned to Chang'an;[12] he subsequently made Pei the military governor of Qinghai Circuit (清海, headquartered in modern Guangzhou, Guangdong), carrying the Tong Zhongshu Menxia Pingzhangshi and You Pushe (右僕射) titles as honorary titles.
The matter came to a head when Zhu wanted a performer that he favored, Zhang Tingfan (張廷範), made the minister of worship (太常卿, Taichang Qing).
Pei, not wanting to carry this out, tried to deflect Zhu's recommendation by stating, "Zhang Tingfan had great accomplishments and should be a military governor.
He refused to approve Zhang's commission, and Zhu, upon hearing this, stated, "I had long thought that the 14th Pei to be true and pure, not frivolous.