In 864, during the reign of
Emperor Yizong, Wei Baoheng passed the imperial examinations in the
Jinshi class. Wei subsequently was promoted to be
Zuo Jianyi Daifu (左諫議大夫), a high-level advisory official at the examination bureau (門下省,
Menxia Sheng), as well as imperial scholar (翰林學士,
Hanlin Xueshi). Because of Wei's marriage with Princess Tongchang, he was allowed to enter the palace at will and often feasted with Consort Guo, leading to rumors that he was having an affair with Consort Guo. In fall 870, Princess Tongchang died. Emperor Yizong was greatly saddened and angered. He executed a group of imperial physicians who failed to save her, and further arrested some 300 of their relatives, despite intercessions by the chancellor
Liu Zhan and the mayor of Jingzhao, Wen Zhang (溫璋). For their attempts to intercede, Liu was demoted, and Wen, hearing this, committed suicide. Lu and Wei then further falsely accused Liu of conspiring with the physicians to poison Princess Tongchang, and Liu was exiled to the extremely remote Huan Prefecture (驩州, in modern
Nghệ An Province,
Vietnam). Despite Princess Tongchang's death, Wei's power did not wane, and he eventually came into conflict with Lu. He therefore spoke against Lu before Emperor Yizong, and Lu was removed from his chancellor position in 871. Similarly removed were fellow chancellors
Yu Cong (in 872) and
Wang Duo (in 873), both of whom had slighted Wei. A group of officials accused of being friendly with Yu were demoted, including
Xiao Gou. (Wei's actions against Wang and Xiao were considered highly contrary to the general rules of officials' friendship at the time, as Wang was the examiner when Wei submitted himself for imperial examinations, and Xiao passed the imperial examinations in the same year as Wei.) == During Emperor Xizong's reign ==