 Seizing opportunity , the Eight Banners crossed the Great Wall after the Ming border general Wu Sangui ( 1612 – 1678 ) opened the gates at Shanhai Pass . This occurred shortly after he learned about the fate of the capital and an army of Li Zicheng marching towards him ; weighing his options of alliance , he decided to side with the Manchus . The Eight Banners under the Manchu Prince Dorgon ( 1612 – 50 ) and Wu Sangui approached Beijing after the army sent by Li was destroyed at Shanhaiguan ; the Prince of Shun 's army fled the capital on the fourth of June . On 6 June , the Manchus and Wu entered the capital and proclaimed the young Shunzhi Emperor ruler of China . After being forced out of Xi 'an by the Qing , chased along the Han River to Wuchang , and finally along the northern border of Jiangxi province , Li Zicheng died there in the summer of 1645 , thus ending the Shun dynasty . One report says his death was a suicide ; another states that he was beaten to death by peasants after he was caught stealing their food . 
