Li Zi (李滋) (died 897), formally the Prince of Tong (通王), was an imperial prince of the Chinese dynasty Tang Dynasty. He was the favorite son of Emperor Xuānzong, but was unable to take the throne after Emperor Xuānzong's death, as his older brother Li Wen (Emperor Yizong) was chosen by the eunuch Wang Zongshi (王宗實), who overpowered other eunuchs who supported Li Zi. Later, during the reign of Emperor Yizong's son (Li Zi's nephew) Emperor Zhaozong, Emperor Zhaozong tried to commission imperial princes to command armies to counteract the powerful warlords (Jiedushi) and eunuchs. In response, in 897, when Emperor Zhaozong had to flee to the domain of one of the warlords, Han Jian, Han falsely accused 11 imperial princes, including Li Zi, of treason, and massacred them without approval from Emperor Zhaozong.
It is not known when Li Zi was born, but as his oldest brother Li Wen was born in 833, and Li Zi was already born by the time that his father Li Chen became emperor (as Emperor Xuānzong) in 846, he must have been born between those dates. When Emperor Xuānzong became emperor, he created five of his sons imperial princes, including Li Zi, who was created the Prince of Kui. Li Zi was Emperor Xuānzong's third son. His mother's name is lost to history.
Li Zi was said to be Emperor Xuānzong's favorite son, and he lived in the palace with four of his brothers, while Li Wen, then the Prince of Yun, who was not favored, was sent out of the palace to live at the residence of the imperial princes, known as the Sixteen Mansions. Emperor Xuānzong also commissioned the officials Zheng Zhang (鄭璋) and Li Ye (李鄴) to attend to Li Zi's studies, lecturing him once every five days.
As Li Zi was Emperor Xuānzong's favorite son, Emperor Xuānzong repeatedly considered creating him crown prince, but as Li Zi was not the oldest son, he hesitated, and went throughout his reign without designating an heir. In 859, when Emperor Xuānzong grew seriously ill due to the side effects of the immortality pills that were given to him by the alchemists Li Xuanbo (李玄伯), Yu Zizhi (虞紫芝), and Wang Le (王樂), he entrusted Li Zi to three eunuchs that he favored — the directors of palace communications Wang Guizhang (王歸長) and Ma Gongru (馬公儒), and the liaison with imperial officials Wang Jufang (王居方). The three eunuchs were suspicious of Wang Zongshi, who commanded the Left Shence Army (左神策軍), and they issued an edict in Emperor Xuānzong's name, sending Wang Zongshi out of the capital Chang'an to serve as the eunuch monitor of Huainan Circuit (淮南, headquartered in modern Yangzhou, Jiangsu). Wang Zongshi initially was set to report to Huainan after receiving the edicts, but his deputy Qi Yuanshi (亓元實) reminded him that he had not seen Emperor Xuānzong for a month and that he could not be sure that it was Emperor Xuānzong who actually wished him gone. With Qi's support, Wang Zongshi forced his way into the palace and found that Emperor Xuānzong had already died. He arrested Wang Guizhang, Ma, and Wang Jufang on charges of falsifying the imperial edict, and then sent soldiers to the Sixteen Mansions to welcome Li Wen to the palace. He then issued an edict in Emperor Xuānzong's name creating Li Wen crown prince. Soon thereafter, Li Wen (whose name was changed to Li Cui) took the throne (as Emperor Yizong).