During Anshi Rebellion
In 755, the general An Lushan rebelled against Emperor Xuanzong's rule, and by 756 was approaching the Tang capital Chang'an, forcing Emperor Xuanzong to flee with his family and close associates. Emperor Xuanzong intended to flee to Jiannan Circuit , but as he reached Mawei , the imperial guards escorting him, blaming An's rebellion on Emperor Xuanzong's favorite concubine Consort Yang Yuhuan and her cousin, the , Yang Guozhong, slaughtered the Yang household and forced Emperor Xuanzong to execute Consort Yang. After the incident, Emperor Xuanzong was intent on continuing to Chengdu . Li Heng did not follow Emperor Xuanzong, and initially remained at Mawei in response to the people of the region's request that he remain to fight against An. Li Heng initially stated that he wished to follow Emperor Xuanzong to Chengdu, but Li Tan convinced him to stay, saying:
In 762, Li Chu succeeded Emperor Suzong as emperor . He posthumously honored Li Tan as the Prince of Qi. In 768, Emperor Daizong and Li Mi discussed further posthumously honoring Li Tan, and Li Mi initially suggested posthumously honoring Li Tan as a crown prince, citing the example of Emperor Xuanzong honoring his younger brothers in that manner. Emperor Daizong, believing that Li Tan's contributions far exceeded those princes, decided instead to posthumously honor Li Tan as emperor and rebury him with ceremony due an emperor. He also Lady Zhang, the daughter of his aunt Princess Xinxing, to Li Tan, honoring her as Empress Gongshun. He had Li Tan worshipped at the same temple that Emperor Suzong had dedicated to his older brother Li Cong, whom Emperor Suzong posthumously honored as an emperor as well.