In fall 396, Tuoba Gui led his Northern Wei troops and made a surprise attack on Bing Province (并州, modern central and northern Shanxi), defeating Murong Nong and forcing him to flee back to Zhongshan. Tuoba Gui then advanced east, ready to attack Zhongshan. Accepting Murong Lin's suggestion, Murong Bao prepared to defend Zhongshan, leaving the Northern Wei forces free to roam over his territory, believing that Northern Wei would retreat once its forces are worn out. However, this had the effect that all of the cities' garrisons in modern Hebei abandoned them, except for Zhongshan and two other important cities—Yecheng (in modern Handan, Hebei) and Xindu (信都, in modern Hengshui, Hebei). After making an initial attack against Zhongshan and failing, Tuoba Gui changed his tactic to establishing his rule over the other cities while leaving Zhongshan alone. In spring 397, Xindu fell. Meanwhile, however, Tuoba Gui had received news of a rebellion near his capital Shengle and offered peace—which Murong Bao rejected, and Murong Bao attacked Northern Wei forces as Tuoba Gui prepared to retreat, but instead was defeated by Tuoba Gui at great loss. At this time, concerned about a coup attempt by Murong Lin, Murong Bao abandoned Zhongshan and fled to the old Former Yan capital Longcheng (龍城, in modern Jinzhou, Hebei). However, the remaining garrison at Zhongshan supported Murong Bao's nephew Murong Xiang () the Duke of Kaifeng as their leader, and Tuoba Gui was unable to take Zhongshan immediately. Realizing that he had alienated the Later Yan people by having slaughtered the captives at Canhe Slope, Tuoba Gui changed his policy and tried to be gentle with the conquered Later Yan territory, and while time would be required, the territories began to abide by his rule.