Battle of Shanhai Pass The Battle of Shanhai Pass , fought on 27 May 1644 at Shanhaiguan ( 山海關 ) at the eastern end of the Great Wall of China , was a decisive battle leading to the formation of the Qing dynasty in China . There , Qing Prince - Regent Dorgon allied with former Ming general Wu Sangui to defeat rebel leader Li Zicheng of the Shun dynasty , allowing Dorgon and the Manchus to rapidly conquer Beijing and replace the Ming Dynasty . Prelude . Rise of the Manchus . As the Ming dynasty faltered and the threat from northern enemies grew , Ming emperors saw the strategic value of Shanhai Pass and frequently garrisoned troops there , armies which sometimes reached up to 40 , 000 men . Under Emperor Hung Taiji ( r . 1626 – 1643 ) , the Qing was becoming more aggressive against the Ming . After an intermittent siege that lasted over ten years , Qing armies led by Jirgalang captured Songshan and Jinzhou in early 1642 . The garrison of Ming general Wu Sangui in Ningyuan became the only major army standing between the Qing forces and the Ming capital in Beijing . In the summer of 1642 , a Qing army managed to cross the Great Wall and ravaged northern China for seven months before withdrawing in May 1643 with prisoners and booty , without having fought any large Ming army . In September 1643 Hung Taiji suddenly died without having named an heir . To avert a conflict between two strong contenders for succession – namely Hong Taiji ' s eldest son Hooge and Hung Taiji ' s agnate brother Dorgon , a proven military leader – a committee of Manchu princes chose to pass the throne to Hong Taiji ' s five - year - old son Fulin and appointed Dorgon and Jirgalang as co - regents . Because Jirgalang had no political ambition , Dorgon became the prime ruler of the Qing government . The fall of Beijing . Just as Dorgon and his advisors were pondering how to attack the Ming , peasant rebellions were ravaging northern China and dangerously approaching the Ming capital Beijing . In February 1644 , rebel leader Li Zicheng had founded the Shun Dynasty in Xi ' an and proclaimed himself king . In March his armies had captured the important city of Taiyuan in Shanxi . Seeing the progress of the rebels , on April 5 the Ming Chongzhen Emperor requested the urgent help of any military commandant in the empire . Eager to secure the loyalty of his military elite , on April 11 he granted the title of " Earl " to four generals , including Wu Sangui and Tang Tong ( 唐通 ) . Tang Tong , the only one of these new earls who was then in Beijing , reorganized the capital ' s defenses and , with a eunuch named Du Xun ( 杜勳 ) , went to fortify Juyong Pass , the last stronghold protecting the northern approach to Beijing . On April 22 , the Ming court learned that Tang Tong had surrendered to Li Zicheng the day before , and that the rebels ' army was now in Changping , sixty - five kilometers northwest of Beijing . Li and his army reached the suburbs of the capital on April 23 , but instead of mounting a full - scale attack on the city walls Li sent the recently surrendered eunuch Du Xun to see the emperor , hoping to secure his surrender . The monarch refused . On April 24 Li Zicheng breached the walls of Beijing ; the emperor hanged himself the next day on a hill behind the Forbidden City . He was the last Ming emperor to reign in Beijing . Wu Sangui . Soon after the emperor had called for help , powerful Ming general Wu Sangui had left his stronghold of Ningyuan north of the Great Wall and started marching toward the capital . On April 26 , his armies had moved through the fortifications of Shanhai Pass ( the eastern end of the Great Wall ) and were marching toward Beijing when he heard that the city had fallen . He returned to Shanhai Pass . Li Zicheng sent two armies to attack the Pass but Wu ' s battle - hardened troops defeated them easily on May 5 and May 10 . In order to secure his position , Li was determined to destroy Wu ' s army . On May 18 he personally led 60 , 000 troops out of Beijing to attack Wu . Meanwhile , Wu Sangui was writing to Dorgon to request the Qing ' s help in ousting the bandits and restoring the Ming dynasty . Wu Sangui ' s departure from the stronghold of Ningyuan had left all territory outside the Great Wall under Qing control . Dorgon ' s Chinese advisors Hong Chengchou and Fan Wencheng ( 范文程 ) urged the Manchu prince to seize the opportunity of the fall of Beijing to claim the Mandate of Heaven for the Qing dynasty . Therefore when Dorgon received Wu ' s letter , he was already leading an expedition to attack northern China and had no intention to restore the Ming . Dorgon asked Wu to work for the Qing instead ; Wu had little choice but to accept . Battle . Preparations for battle . On May 25 , Li Zicheng deployed his men along the Sha River ( 沙河 ) a few kilometers west of the Shanhaiguan fortifications . He could observe the battlefield from a nearby hill , accompanied by two young Ming princes whom he had taken hostage . Wu Sangui assigned two trusted lieutenants to the defense of the northern and western walls of Shanhaiguan , and let gentry - led militia protect the eastern wall of the garrison . He then deployed his troops near Sha River to face Li Zicheng ' s army . Also on May 25 , Dorgon received a letter from Wu Sangui declaring that Wu was willing to surrender to the Qing in return for Dorgon ' s help in suppressing Li Zicheng ' s forces . Immediately setting his troops on a forced march toward Shanhai Pass , Dorgon and the Qing army quickly covered about 150 kilometers . On their way to Shanhaiguan , they ran into Tang Tong , who had been ordered to attack Wu Sangui from behind with a few hundred men . The forces of the former Ming general were virtually annihilated by the Qing army , and though Tang Tong managed to escape he soon surrendered to the Qing . At dusk on May 26 , Dorgon ' s forces settled eight kilometers away from the Pass and slept in their armor until midnight , when they were awoken again to continue marching . Having instructed his brothers Ajige and Dodo to lead two wings of ten thousand men each to protect his flanks , Dorgon led his main force toward the Pass . The battle . At dawn on May 27 , the main Qing army reached the gates of Shanhaiguan , where Dorgon received Wu Sangui ' s formal surrender . Wu Sangui asked his men to attach pieces of white cloth to their back so that the Qing forces could tell them apart from the Shun rebels . Wu Sangui ' s forces were deployed in the vanguard and were ordered to charge the Shun army , but despite disorder in the Shun ranks , their defense line did not yield . Unable to break the rebels ' line , Wu ' s troops suffered heavy casualties . Historian Frederic Wakeman claims that by the late afternoon , Wu Sangui ' s army was on the verge of defeat when a " violent sandstorm " started blowing on the battlefield . Dorgon chose this moment to intervene : galloping around Wu ' s right flank , the Qing cavalry charged Li ' s left wing . When they saw mounted warriors with shaved foreheads rushing at them out of the storm , Shun troops broke their lines and fled . With their left wing shattered , the Shun army disbanded ; thousands of Shun soldiers were massacred as they retreated chaotically toward Yongping . Li was probably unaware of the Manchus ' presence when he arrived at Shanhaiguan ; certainly , had he been aware of it , his enemies ' numerical superiority , in addition to their more experienced soldiers , might have dissuaded him from pressing battle . Number of troops . The number of troops that took part in the battle is unclear and has been disputed . Early Qing sources tend to inflate the number of Li Zicheng ' s troops because they wanted to emphasize the Qing ' s military prowess against the Shun ; these sources claim that Li Zicheng ' s army counted up to 200 , 000 men . Modern historians have largely deflated these figures : Frederic Wakeman gives a figure of 60 , 000 men for Li ' s army , whereas Frederick Mote claims that Li had more than 100 , 000 troops under his command . Assessments of Wu ' s forces range from 40 , 000 to 80 , 000 , mounting to a total of about 100 , 000 when counting militia units . Wakeman claims that Wu ' s " regular army " counted 40 , 000 men , but that he commanded " 50 , 000 troops of his own " and had managed to raised 50 , 000 men from local militia . Mote , on the other hand , states that Wu had 80 , 000 men garrisoned in Ningyuan when he left that city for Shanghaiguan in April 1644 , and that 20 , 000 to 30 , 000 militiamen also came to him unsolicited the day of the battle of Shanhai Pass . Angela Hsi , for her part , cites a contemporaneous source to argue that Wu led 40 , 000 troops ( " one of the better military forces of the day " ) and that he was assisted by 70 , 000 residents of Liaodong ( 遼東 ) , " who were reputed to be excellent fighters . " Aftermath . On the evening of May 27 , Li and his main army stayed at Yongping ( 永平 ) on the road to Beijing while many of his officers and soldiers fled toward the capital . On the next day he retreated toward Beijing , which he reached on May 31 . He then let his troops loot the capital ' s official residences and government bureaus . On June 3 , as a " final gesture of defiance " after his decisive defeat , Li officially declared himself Emperor of the Great Shun at the Wuying Palace ( 武英殿 ) . After 42 days in Beijing , Li Zicheng set the imperial palace complex on fire and abandoned the capital to flee toward the west . The Beijing population then massacred nearly two thousand rebels who had not fled . On June 5 , the Beijing population prepared to welcome those who had defeated Li Zicheng . The elders and officials who went out of the city expecting to greet Wu Sangui and the Ming heir apparent were shocked when the leader of the victorious army turned out to be Prince Regent Dorgon of the Qing . Dorgon and his retinue rode to Donghua Gate ( 東華門 ) , an eastern gate to the Forbidden City , to receive the imperial regalia ; Dorgon was then escorted to Wuying Palace by the former Ming imperial bodyguards , who had previously submitted to Li Zicheng but now vowed to serve the Qing . Dorgon welcomed the Shunzhi Emperor to Beijing on October 19 . The young monarch was officially enthroned as Emperor of China on Novermber 8 , 1644 , marking the moment when the Qing seized the Mandate of Heaven . On May 28 , Wu Sangui ' s Ming title of Pingxi Earl ( 平西伯 ) was raised to Pingxi Prince ( 平西王 ) . His troops shaved their heads and joined the main Qing forces . Very soon after entering Beijing , Dorgon despatched Wu and his troops to pursue Li Zicheng . Wu managed to engage Li ' s rearguard many times , but Li still managed to cross Gu Pass into Shanxi ; Wu then broke pursuit to return to Beijing . Li then reestablished a power base in Xi ' an ( Shaanxi province ) , where he had declared the foundation of his Shun dynasty in February 1644 . After repressing revolts against Qing rule in Hebei and Shandong in the Summer and Fall of 1644 , in October of that year Dorgon sent several armies to extirpate Li Zicheng from his Shaanxi stronghold . Qing armies led by Ajige , Dodo , and Shi Tingzhu ( 石廷柱 ) won consecutive engagements against Shun forces in Shanxi and Shaanxi , forcing Li Zicheng to leave his Xi ' a headquarters in February 1645 . Li retreated through several provinces until he was killed in September 1645 , either by his own hand or by a self - defense peasant group . The Qing conquest of China lasted for several more decades . Resistance to Qing rule was intensified by the " haircutting command " of June 1645 , which forced all Chinese men to shave their forehead and tie their remaining hair into a queue . Zhu Youlang , the last emperor of the Southern Ming , was killed by Wu Sangui in 1662 . Wu Sangui was given a large territory in the southwest China , where he reigned as a satrap until he was recalled to Beijing in 1673 . He and three other governors then rose in rebellion against the Qing . Though Wu died in 1678 , the rebellion of the Three Feudatories lasted until 1681 . In 1683 the Kangxi Emperor ( r . 1662 - 1722 ) defeated the forces of Koxinga , the leader of the last Ming restoration movement . After this period of solidification , the Qing controlled China until 1912 . Timeline . The battle of Shanhai Pass took place on May 27 , 1644 , but it was preceded and followed by a series of events that gave the battle a special historical significance . This timeline presents these events . All the dates are for 1644 .