In 755, the general
An Lushan rebelled at Fanyang Circuit (范陽, headquartered in modern
Beijing), and by 756, forces of his new
Yan state were approaching Chang'an, forcing Emperor Xuanzong to flee toward
Chengdu. Emperor Xuanzong's son and crown prince
Li Heng (note different character than Li Xian's brother) did not follow Emperor Xuanzong on the trek to Chengdu, but instead fled to
Lingwu, where he was declared emperor (as Emperor Suzong) – an act that Emperor Xuanzong recognized when he heard the news. After Emperor Suzong's ascension but before Emperor Xuanzong received the news, however, Emperor Xuanzong made a number of commissions of Emperor Suzong and his other sons, giving them different regions of responsibility in the realm, and one of Emperor Suzong's younger brothers,
Li Lin the Prince of Yong, was given the areas of Shannan East (山南東道, headquartered in modern
Xiangfan,
Hubei),
Lingnan (headquartered in modern
Guangzhou,
Guangdong), Qianzhong (黔中, headquartered in modern
Chongqing), and Jiangnan West (江南西道, headquartered in modern
Nanchang,
Jiangxi) Circuits, with Dou Shao () and Li Xian as his assistants, and his headquarters set at
Jiangling. After Li Lin reported to his post, however, it became clear that Li Lin intended to rule the area as his own realm independent from Emperors Xuanzong and Suzong, and he further intended to incorporate other regions south of the
Yangtze River into his private realm. Li Xian, realizing this, claimed an illness and resigned, but instead reported to Emperor Suzong's court, where he conferred with Emperor Suzong and the official
Gao Shi () on strategies to defeat Li Lin. (Soon, when Li Lin openly rebelled, he was defeated by the generals Li Xian (李銑, note different character) and Li Chengshi (), and was ultimately captured and executed by the general Huangfu Shen () Meanwhile, Emperor Suzong made Li Xian the governor of
Fufeng Commandery (扶風, roughly modern
Baoji,
Shaanxi) – where Emperor Suzong was at the time, so effectively the mayor of the capital again – as well as chief imperial censor (御史大夫,
Yushi Daifu). After Emperor Suzong recaptured Chang'an in 757, he made Li Xian the mayor of Jingzhao Municipality again and created him the Duke of Liang, making him of the same rank as his older brother Li Heng, who had already been created the Duke of Zhao, as the eldest son of a prince. After a joint Tang and
Huige force commanded by Emperor Suzong's son
Li Chu the Prince of Chu recaptured Luoyang as well, Li Xian, then also carrying the title of minister of rites (禮部尚書,
Libu Shangshu), along with his colleagues
Lü Yin and Cui Qi (), were put in charge of judging the cases against former Tang officials who had surrendered to and served the Yan regime. It was said that Lü and Cui were harsh, but Li Xian was merciful and gained a good reputation from his judgments. In late 757, after they had judged most of the cases, Lü and Cui proposed that those former officials who had served Yan should all be put to death. Li Xian pointed out that the rebellion had not entirely been put down yet, and further, some officials were coerced into serving Yan, and should be treated differently from those who openly embraced Yan causes. At Li Xian's suggestion, Emperor Suzong divided the punishment for those former Tang officials into six grades, with the punishments being beheading, forced suicide, caning, exile, and demotion, respectively. In spring 759, as a part of reorganization of his chancellors, Emperor Suzong removed
Miao Jinqing and
Wang Yu as chancellors, and replaced them with Lü, Li Xian,
Li Kui, and
Diwu Qi, giving all of them the
de facto chancellor designations
Tong Zhongshu Menxia Pingzhangshi (). Li Xian was also given the post of
Zhongshu Shilang (), the deputy head of the executive bureau of government (中書省,
Zhongshu Sheng). Emperor Suzong trusted Li Xian the most, and Li Xian was the most senior among the chancellors, and therefore Li Xian made the most decisions, drawing resentment from Lü. At that time, the powerful
eunuch Li Fuguo and the secret police agents that he employed were able to roam through Chang'an, doing whatever they wished in the emperor's name with impunity. At Li Xian's suggestion, Emperor Suzong suspended the secret police agents' powers, causing LI Fuguo to resent Li Xian as well. Soon, the issue came to a head when a horse trainer inside the palace at Fengxiang Municipality (i.e., the former Fufeng Commandery) committed robbery and was captured and executed by the sheriff of Tianxing County (天興, in modern Baoji) Xie Yifu (). The trainer's wife protested her husband's innocence to Li Fuguo, who had previously served in the same role and therefore was sympathetic. Li Fuguo thus ordered reinvestigations, which were carried out by the officials Sun Ying (), Cui Boyang (), Li Ye (), and Quan Xian () – all of whom agreed that Xie's actions were proper. However, neither the wife nor Li Fuguo was satisfied, and Li Fuguo ordered the imperial censor Mao Ruoxu () to reinvestigate, and Mao, wanting to flatter Li Fuguo, concluded that Xie wrongly executed the trainer. Cui, who was Mao's superior, in anger, wanted to file an accusation against Mao, but Mao instead met with Emperor Suzong first and protested his innocence. When Cui did submit his accusation that Mao was flattering Li Fuguo, Emperor Suzong exiled Cui, Quan, Li Ye, and Yan Xiang () the mayor of Fengxiang Municipality, while Sun was not only exiled but further reduced to commoner rank. Li Xian submitted a defense of Cui, and Emperor Suzong, believed that Li Xian was engaged in factionalism, was instead removed from his chancellor post and demoted to be the governor of Shu Prefecture (蜀州, in modern Chengdu). == During Emperor Daizong's reign ==