As Regent Over Yang Hao
Yuwen Huaji declared himself grand chancellor and effectively served as regent. He issued an edict in Empress Xiao's name, declaring Yang Hao emperor, but did not allow Yang Hao to actually exercise any imperial authorities. He soon gathered Emperor Yang's court, including his concubines and ladies in waiting, as well as officials, and began heading back northwest, toward the eastern capital Luoyang, leaving the general Chen Leng (陳稜) in charge at Jiangdu. On the way, the Xiaoguo officers Mai Mengcai (麥孟才), Qian Jie (錢傑), and Shen Guang (沈光) tried to carry out a counter-coup to overthrow Yuwen Huaji and to avenge Emperor Yang, but they only succeeded in killing the co-conspirator Yuan Min (元敏) before they were surrounded and killed.
Meanwhile, Yuwen Huaji began to live in luxury, using items and ceremonies only appropriate for emperors. Not willing to abandon Emperor Yang's treasures, he carried them along, at great expense in manpower. Shocked at Yuwen Huaji's conduct, Sima Dekan, Zhao Xingshu, along with several other officers, plotted against Yuwen Huaji, planning to support Sima as leader instead. However, when they secretly asked for support from the nearby agrarian rebel leader Meng Haigong (孟海公), Meng did not respond quickly, and the plot leaked. Yuwen Huaji sent Yuwen Shiji to arrest Sima. He rebuked Sima:
- We have together tried to pacify the empire, and it can be said that we have survived 10,000 deaths. Now that we have accomplished it, it is time for us to share our honors. Why were you plotting against me?
Sima responded:
- We executed the tyrant because we could not endure his immorality and cruelty, and we supported you. You, instead, are even worse than the tyrant. I was forced into this.
Yuwen Huaji then had Sima executed.
As Yuwen Huaji approached Luoyang, the rebel leader Li Mi, who controlled the region, resisted him. Yuwen Huaji initially could not get past Li, and therefore went to and took over Dong Commandery (東郡, roughly modern Anyang, Henan). Both Li Mi and the Sui officials at Luoyang (who had, after hearing of Emperor Yang's death, declared Emperor Yang's grandson Yang Tong the Prince of Yue emperor) were apprehensive of Yuwen Huaji's next move, and they, previously enemies, entered into an alliance where Li, previously showing imperial ambitions of his own, accepted a Sui-bestowed title of Duke of Wei and nominally submitted to Yang Tong. Yuwen Huaji made several attacks on Li Mi but could not prevail. Li, knowing that Yuwen Huaji's food supplies were running out, pretended to offer peace to Yuwen, agreeing to supply Yuwen's army with food, but instead planning to withhold food and, once Yuwen's food supplies did run out, attack. Li's plans, however, became known by Yuwen, and he in turn made a surprise attack on Li, nearly killing Li, but Li's general Qin Shubao protected Li from death, and eventually Yuwen was repelled. Yuwen, unable to gain food, headed north away from Li, and Li did not trail him. Many of his soldiers surrendered to Li, but he still had some 20,000 men by this point.
After Yuwen Huaji reached Wei (魏縣, in modern Handan, Hebei), his close associate Zhang Kai (張愷), who had previously helped him suppress Sima's plot, plotted against him. Yuwen Huaji discovered the plot and executed Zhang and his co-conspirators, but by this point was growing increasingly despondent over the increasing desertions from his rank. He and his brothers often feasted and wept at the feast, and he and Yuwen Zhiji blamed each other for the plot. Yuwen Huaiji, believing that defeat was near, wanted to take imperial title. In fall 618, he therefore poisoned Yang Hao to death and declared himself emperor of the state of Xu.
Read more about this topic: Yuwen Huaji