Wu Sangui (; 8 June 1612 – 2 October 1678), courtesy name Changbai () or Changbo (), was a Chinese military leader who played a key role in the fall of the Ming dynasty and the founding of the Qing dynasty. In Chinese folklore, Wu Sangui is regarded as a disreputable Han Chinese traitor for his defection over to the Manchu invaders, suppression of the Southern Ming resistance and execution of the Yongli Emperor. Wu eventually double-crossed both of his masters, the Ming and the Qing dynasties.

In 1644, Wu was a Ming general in charge of garrisoning Shanhai Pass, the strategic choke point between Manchuria and Beijing. After learning that Li Zicheng's rebel army had conquered Beijing and captured his family, including his father Wu Xiang and concubine Chen Yuanyuan, Wu allowed the Manchu to enter China proper through Shanhai Pass to drive Li from Beijing, where the Manchu then set up the Qing dynasty. For his aid, the Qing rulers awarded him a fiefdom consisting of Yunnan and Guizhou provinces, along with the title "Prince Who Pacifies the West" ().

In 1674, Wu decided to rebel against the Qing. In 1678, Wu declared himself the new Emperor of China and the ruler of Zhou, only to die within months. For a time, his grandson Wu Shifan succeeded him. The revolt was quelled in 1681.

Early years Wu was born in Suizhong, Liaoxi province, in Northeastern China, to Wu Xiang and Lady Zu. His ancestral home was Gaoyou, Jiangsu. Wu Sangui's father and uncle had fought in many battles. Under their influence, Wu took great interest in war and politics at an early age. He was also a student of artist Dong Qichang. Late Ming dynasty historians left behind records describing Wu Sangui as a valiant and handsome general of medium height, with pale skin, a straight nose, and big ears, with a scar on his nose. He possessed excellent skills in horse-riding and archery.

In 1627, the Chongzhen Emperor decided to reinstate the imperial examination system on his accession to the throne, and Wu became a first-degree military scholar (juren) at the age of fifteen. He and his two brothers joined the army, garrisoning the Daling River and Ningyuan in the army of general Zu Dashou.

In 1630, while gathering information about the enemy, Wu's father, Wu Xiang, was encircled by the Qing troops. Wu Sangui was denied help from his maternal uncle, Zu Dashou, and so decided to rescue his father with a force of about 20 soldiers chosen from his personal retinue. Wu Sangui and his small cavalry force charged into the enemy encirclement, killing the Manchu general and saved Wu Xiang. Both Hong Taiji and Zu were impressed by Wu's valour, and Zu recommended Wu's promotion. Wu Sangui gained the position of guerrilla general when he was no older than 20.

Service under the Ming dynasty

Garrisoning Liaodong In 1632, the Ming court transferred the Liaodong army to Shandong, to defeat the rebel armies of Kong Youde. Wu, who was 22 years old, served as a guerrilla general and fought side by side with his father, Wu Xiang. Wu rose to the rank of deputy general and was promoted to full general in September of that year. In September 1638, Wu served as a deputy general again.

At the beginning of 1639, as the situation in Liaodong became increasingly tense, the Ming court transferred general Hong Chengchou as the governor-general () of Jiliao; Hong appointed Wu as the general in charge of training.

In October 1639, a Qing army of more than 10,000 men, commanded by Duoduo and Haoge, invaded Ningyuan. Jin Guofeng, full general of Ningyuan, immediately led troops to confront the Qing army but was surrounded and killed. Wu took Jin's place as full general of Ningyuan, and became a guardian general of Liaodong.

After Wu served as the full general in Ningyuan, he made the local army the strongest in Liaodong, having 20,000 troops at Ningyuan town. To enhance their combat power, Wu selected 1,000 elite soldiers to form a fearless battalion. The battalion was trained and commanded by Wu himself, making these men his bodyguard who would come at Wu's call at any time. They were the core of his army and laid the foundation for Wu's military achievements.

In March 1640, Hong Taiji appointed Jirgalang and Duoduo as left and right commander, respectively, marching towards the north of Jinzhou. Aiming to besiege Jinzhou, they reestablished Yizhou, garrisoned the troops, opened up wasteland, grew food grain, and forbade any cultivation in the Ningjin area outside Shanhai Pass.

Battle of Xingshan On 18 May 1640, Wu Sangui met the Qing army in battle at Xingshan. Jirgalang led 1,500 soldiers to accept the surrender of the Mongolian people, but they were spotted by general Liu Zhaoji when passing the Ming army. Liu Zhaoji led 3,000 soldiers against the Qing army. At that time, Wu Sangui was stationed in Songshan and brought a 3,000-strong force the moment he heard the news. From Jinzhou, Zu Dashou sent more than 700 soldiers as a reserve. At first, the Ming army seemed more powerful with superior numbers; but, after the pursuit of Jiamashan, the Qing army was able to surround Wu Sangui.

Wu Sangui was unable to withstand the repeated attacks from both Jirgalang and Duoduo. He fought a bloody battle with the Qing army, but could not break through the siege until Liu Zhaoji came to his rescue. The Ming army casualties were more than 1000, with deputy general Yanglun and Zhou Yanzhou dead, but Wu Sangui's bravery was still praised.

Battle of Songjin On 25 April 1641, the battle of Songjin began with an attack by the Ming army, Wu Sangui leading and personally killing ten enemies, defeating the Qing cavalry. After the battle, Wu Sangui was regarded as its most outstanding general.

In June 1641, Hong Chengchou and Wu Sangui returned to Songshan and garrisoned the northwest area. Prince Zheng Jirgalang attacked several times towards Songshan and Xinshan but was defeated repeatedly, the Ming army succeeding in surrounding the Qing army four times. Though the Qing army finally broke through the encirclement, their casualties were very high. Due to Wu Sangui's bravery, the Ming army remained on the offensive, but it also paid a heavy price.

On 20 August 1641, the Ming army attacked the Qing camp. The battle lasted the whole day, and the result was too close to call. However, Prince Ajige unexpectedly captured the Ming army's provisions in Bijia Mountain, significantly undermining their ability to fight. The battle continued on 21 August, and was unfavourable to the Ming army. After this defeat Datong full general Wang Pu lost the will to fight. Before Hong Chengchou issued orders, Wang fled with his troops, which completely disrupted the original breakthrough plan. More surprisingly, Wu Sangui also fled in the chaos, escaping on Wang's heel. At such a life-or-death moment, Wu revealed selfishness.

The Ming army attempted to withdraw, pursued by the Qing. In a matter of a few days, more than 53,000 people and 7,400 horses of the Ming army were killed. They had no way to flee and no will to fight. Only 30,000 survived after fleeing back to Ningyuan.

Wu Sangui survived not only by following Wang Pu, but by having a good retreat plan. When Hong Chengchou ordered the breakthrough, Wu Sangui went back to his camp and immediately discussed tactics with his generals. They decided to give up the small path and flee on the main road. As expected, the Qing army had only cut off the small path, while no more than 400 soldiers held the main road under Hong Taiji. Seeing Wu Sangui's fierce charge, Hong Taiji restrained his army from pursuing. Hong thought highly of Wu, and considered gaining his favor as the key to conquering the dynasty.

The breakthrough at Songshan resulted in the deaths of 52,000 members of the Ming elite army, which greatly wounded the Ming dynasty. Wu and Wang Pu could not escape the fate of being punished for fleeing and avoiding combat and were sentenced to death.

Promotion after the defeat A few days later, Wu, who had fled to Ningyuan, received the imperial decree of the Chongzhen emperor. Surprisingly, Wu was promoted above all the full generals. This implied that Wu would not be punished, which was beyond the comprehension of many government officials. Even more surprising was that, months later, when someone in the court called for an investigation to determine responsibility for the Songshan defeat, only Wang Pu was arrested while Wu continued to serve as a governor general of Liaodong, garrisoned in Ningyuan. This caused an outcry in the Ming court.

In May 1642, the result of the Ming court's re-examination was the death penalty for Wang Pu, and demotion of three levels in rank for Wu. Wu continued to serve as full general in Ningyuan and was in charge of the training of the Liaodong army.

Defection to the Qing

Surrender to the Qing dynasty By February 1642, the Ming dynasty had lost four of the eight vital cities beyond Shanhai Pass to the Manchu army. Ningyuan, where Wu was stationed, became Beijing's last defence against the Manchu army. Hong Taiji repeatedly attempted to persuade Wu to surrender, to no avail. Wu did not side with the Qing dynasty until after the defensive capability of the Ming dynasty had been greatly weakened with its political apparatus destroyed by the rebel armies of Li Zicheng's Shun dynasty.

In early 1644, Li Zicheng, the head of a peasant rebel army, launched his force from Xi'an for his final offensive northeast toward Beijing. The Chongzhen Emperor decided to abandon Ningyuan and called upon Wu to defend Beijing against the rebels. Wu Sangui received the title Pingxi Bo () as he moved to face the peasant army.

At the time of Beijing's fall to Li Zicheng, on 25 April 1644, Wu and his 40,000-man army—the most significant Ming fighting force in northern China—were on the way to Beijing to come to the Chongzhen Emperor's aid but then received word of the emperor's suicide. So they garrisoned Shanhai Pass, the eastern terminus of the main Great Wall instead. Wu and his men were then caught between the rebels within the Great Wall and the Manchus without.

After the collapse of the Ming dynasty, Wu and his army became a vital military force in deciding the fate of China. Both Dorgon and Li Zicheng tried to gain Wu's support. Li took a number of measures to secure Wu's surrender, granting silver, gold, a dukedom, and most crucially by capturing Wu's father, Wu Xiang, and concubine, Chen Yuanyuan, ordering the former to write a letter to persuade Wu to pledge allegiance to Li.

Wu, however, was enraged by Li's capture of his family and the looting of Beijing. He killed Li's envoy, wrote back to his father, scolding him for his disloyalty, and sent several generals to pretend to pledge allegiance to Li. Aware that his force alone was insufficient to fight Li's main army, Wu wrote to the Manchu prince-regent Dorgon for military support, under the condition of restricting the dominance of the Manchus to northern China and the Ming to south. Dorgon replied that the Manchus would help Wu, but Wu would have to submit to the Qing. Wu did not accept at first.

Li Zicheng sent two armies to attack the pass, but Wu's battle-hardened troops defeated them easily on 5 and 10 May 1644.. In order to secure his position, Li was determined to destroy Wu's army. On 18 May, he personally led 60,000 troops out of Beijing to attack Wu and defeated Wu on 21 May. The next day, Wu wrote to Dorgon for help. Dorgon took the opportunity to force Wu to surrender, and Wu had little choice but to accept.