As crown prince
In 675, Li Xian's older brother Li Hong the crown prince died—a death that traditional historians generally believed to be a poisoning ordered by Empress Wu. On July 3, Li Xian was created crown prince to replace Li Hong. Emperor Gaozong soon ordered that much of government matters be ruled on by Li Xian, But because most of the imperial work was done by Empress Wu, his decisions were under her mother's control. But Li Xian was praised for making good decisions. Also around this time, Li Xian led a group of scholars, including Zhang Da'an, Liu Nayan (劉訥言), Ge Xiyuan (格希元), Xu Shuya (許叔牙), Cheng Xuanyi (成玄一), Shi Cangzhu (史藏諸), and Zhou Baoning (周寶寧), in writing commentaries for the Book of Later Han, the official history of the Eastern Han dynasty, written by the Liu Song scholar Fan Ye.
Meanwhile, Li Xian's relationship with Empress Wu began to deteriorate, as Li Xian had heard the rumors that he was actually the son of Lady of Han, and had become fearful. Empress Wu, detecting this, had her literary staff write two works entitled, Good Examples for Shaoyang (少陽正範, "Shaoyang" being an oblique term for a crown prince) and Biographies of Filial Sons (孝子傳) and gave them to Li Xian, and further wrote a number of letters rebuking Li Xian, making him more fearful. At the same time, Empress Wu relieved his duties as head of many government decisions and changed all of Li Xian's previous policies. Further, when the sorcerer Ming Chongyan (明崇儼), who was well-trusted by Emperor Gaozong and Empress Wu, was assassinated in 679, Empress Wu suspected Li Xian—as Ming had been known to repeatedly make comments to Empress Wu that included, "The Crown Prince cannot bear the responsibilities of state. The Prince of Ying [(i.e., Li Xian's younger brother Li Zhe, later Emperor Zhongzong] has an appearance most similar to Emperor Taizong ([Emperor Gaozong's father])," and "The Prince of Xiang [(i.e., Li Xian's younger brother Li Dan, later Emperor Ruizong)] has the most honorable appearance."
Meanwhile, Li Xian was also known for his liking of music and women. (Some historians, pointing to oblique references that he was "particularly close" to a number of male servants, also believe that he liked sexual relations with both women and men.) When Empress Wu heard this, she had people report the news to Emperor Gaozong, who then ordered an investigation, led by the officials Xue Yuanchao, Pei Yan, and Gao Zhizhou. When they searched the crown prince's stables, they found several hundred suits of black armor, and they believed this to be evidence of a coup. After interrogation, one of Li Xian's favorite servants, Zhao Daosheng (趙道生), admitted to assassinating Ming on Li Xian's orders. Emperor Gaozong, who had favored Li Xian, considered pardoning him, but Empress Wu refused, and she asked him to be quiet. On September 20, 680, Emperor Gaozong deposed Li Xian and reduced him to commoner rank, delivering him from the eastern capital Luoyang (where Emperor Gaozong and Empress Wu had long taken up residence) to the capital Chang'an to be imprisoned there. His close associates were executed, and the seized armor was burned publicly to demonstrate Li Xian's treason. Li Zhe was created crown prince to replace him.