The Battle of Yanshi (Chinese: 偃師之戰) was fought on 5–6 October 618 between the armies of Wang Shichong and Li Mi, rival contenders for the succession of the Sui dynasty.
Wang, who was still ostensibly a Sui loyalist and had been blockaded in Luoyang for months by Li, gambled on a decisive battle and led his troops out to attack the besieging army.
While Li sought refuge in the rival Tang court, Wang consolidated his control over Henan and eventually deposed the Sui puppet ruler Yang Tong and declared himself as emperor of the new Zheng dynasty.
[1][2][3] Yang nevertheless continued to be fixated on the Korean campaigns, and by the time he realized the gravity of the situation, it was too late: as revolts spread, in 616, he abandoned the north and withdrew to Jiangdu, where he remained until his assassination in 618.
Li Mi, whose own base, the great granary at Liyang, was threatened, agreed, hoping in turn to profit from his legitimization and gain control of Luoyang.
[13] Facing starvation and surrender, Wang Shichong decided to risk an open confrontation with Li Mi, in an attempt to push him back and break the siege.
[14] Apparently this had the desired effect, for on 4 October 618 Wang led his army out of Luoyang and, following the course of the Luo River, marched eastward, bypassing Li Mi's forward positions.
On the afternoon of the next day, Wang's army had reached the walled town of Yanshi, some 20 miles from Luoyang and located between the Luo River to the south and an irrigation canal to the north.
The main host, under Li Mi, remained on the Mang hills, while a detachment under Shan Xiongxin moved down to the plain just north of Yanshi and established a camp there.
The two camps, in the description of David Graff, formed "an inverted letter 'L' running east along the mountain and then turning sharply south across the plain to Yanshi".
Li Mi felt confident in his superior position, which gave him ample time to descend the hills and move against Wang, should he try to cross the canal for an attack.
[18] During the night Wang laid bridges across the canal, and before dawn his army crossed over and deployed in battle formation close to Li Mi's camps.
[18] According to one account, Wang's victory was secured by a stratagem: one of his soldiers, who greatly resembled Li Mi, was bound and displayed to the rebel troops at the height of the battle, whereupon their resistance collapsed.