Ming conquest of Yunnan

The Ming conquest of Yunnan was the final phase in the Ming dynasty expulsion of Mongol-led Yuan dynasty rule from China proper in the 1380s.

Background
The Hongwu Emperor had sent envoys to Yunnan in 1369, 1370, 1372, 1374, and 1375 to request for its submission. Some of the envoys were killed and this was the pretext under which an invasion was launched against the regime in Yunnan, then still loyal to the Northern Yuan.

War
Some 250,000 to 300,000 Han and Hui Muslim troops were mobilized to crush the remaining Yuan-held territory in Yunnan in 1381.

The Ming General Fu Youde led the attack on the Mongol and Muslim forces of the Northern Yuan. Also fighting on the Ming side were Generals Mu Ying and Lan Yu, who led Ming loyalist Muslim troops against Yuan loyalist Muslims.

The Prince of Liang, Basalawarmi, committed suicide on January 6, 1382, as the Ming dynasty Muslim troops overwhelmed the Northern Yuan's Mongol and Muslim forces. Mu Ying and his Muslim troops were given hereditary status as military garrisons of the Ming dynasty and remained in the province.

Dali loyalists
Duan Gong, whose ancestors were the rulers of the Dali Kingdom prior to the Mongol conquest, and had administered the region under the Yuan dynasty, refused to accept Ming administration. He made it clear that Dali could only be a tributary to the Ming. Fu Youde attacked and crushed Duan Gong's realm after a fierce battle. The last Dali stronghold of Dengchuan (邓川) fell to the Ming in February 1383. The Duan brothers were taken captive and escorted back to the Ming capital.

Aftermath
The Ming Generals Lan Yu and Fu Youde castrated 380 captured Mongol and Muslim captives after the war. This led to many of them becoming eunuchs and serving the Ming Emperor. One of the eunuchs was Zheng He.

In Luchuan (in modern-day Ruili and northern Myanmar), Möng Mao forces rebelled against the Ming from 1386 to 1389 and again from 1397 to 1398.

In western Yunnan and Guizhou, Ming soldiers also crushed local rebellions. The Ming soldiers then married local Han, Miao, and Yao women; their descendants are called "Tunbao", in contrast to newer Han colonists who moved to Yunnan in later centuries. The Tunbao still live in Yunnan today.