Li Jiancheng
Later in 626, Li Shimin, then in an intense rivalry with Li Jiancheng, who had been made crown prince as the oldest son, feared that Li Jiancheng was about to kill him. He submitted a secret petition to Emperor Gaozu accusing Li Jiancheng and another brother, Li Yuanji the Prince of Qi, who supported Li Jiancheng, of committing adultery with Emperor Gaozu's concubines and plotting to kill him. Emperor Gaozu, shocked by the accusations, summoned Xiao, along with Pei and Chen, to prepare to act on the accusations the next morning. Meanwhile, Li Shimin set an ambush for Li Jiancheng and Li Yuanji at Xuanwu Gate outside Emperor Gaozu's palace, and when Li Jiancheng and Li Yuanji approached Xuanwu Gate in the morning, Li Shimin killed them, and then sent his general Yuchi Gong into the palace, claiming to be protecting Emperor Gaozu. Emperor Gaozu, realizing how serious the situation was, asked Pei, Xiao, and Chen for advice, and Xiao and Chen advised him to create Li Shimin crown prince to placate him. Emperor Gaozu did so, and two months later passed the throne to Li Shimin, who took the throne as Emperor Taizong.