Ming conquest of Ming Xia

The Ming conquest of Sichuan saw the Ming Dynasty conquer Sichuan from the Ming Xia Kingdom from 1370 to 1371. Besides being situated in a rich province, Xia also prevented further Ming Dynasty expansion into southwestern areas such as Yunnan. The Ming Dynasty's ultimate victory marked the unification of China proper by the Hongwu Emperor.

Background
After the Battle of Lake Poyang, the Hongwu Emperor defeated the rivaling warlords Chen Youliang and Zhang Shicheng before founding the Ming Dynasty and pushing the Yuan Dynasty out of northern China. By 1370, most of China proper (besides Sichuan) had been unified by the Ming Dynasty; Sichuan was still under Ming Xia's control. Xia was founded in 1360 by Ming Yuzhen after he refused to recognize Chen Youliang's assassination of Xu Shouhui and Chen's subsequent enthronement as emperor. Xia's attempts towards territorial expansion, particularly into Yuan-controlled Yunnan, were unsuccessful. The kingdom lost much of its central authority after Ming Yuzhen died in 1366 and his young son, Ming Sheng, took the throne. In 1366, Hongwu sent envoys to Xia, ostensibly to recognize the succession but actually to spy and prepare maps for the coming invasion. Though Xia had maintained relatively good relations with the ascendant Ming Dynasty, it refused an offer of surrender from the Ming envoy Yang Jing. Xia also blocked potential Ming Dynasty expansion into Yunnan by denying military access to Ming. Hongwu tried to intimidate the Xia court by having a Xia envoy accompany Xu Da and observe Xu's army. This failed and Xia bolstered its defenses, particularly along the Yangtze. Xia general Wu Youren plundered Xingyuan and Hanzhong in August 1370.

The Hongwu Emperor began preparing to invade Sichuan in 1370. Xu Da was to guard against potential Northern Yuan incursions from his base in the former Yuan capital, Beiping. Tang Yu was sent to Xiangyang to transport supplies to Shaanxi, where Fu Youde was preparing to invade Sichuan from the north. Tang He and Liao Yongzhong were to sail up the Yangtze and enter Sichuan from the east.

War
Preparations for the conquest of Sichuan were finalized in May. As a casus belli, Hongwu cited Xia's refusal to send timber, the denial of military access (to facilitate a Ming invasion of Yunnan), and Wu Youren's attempted reconquest of Xingyuan. Fu Youde was made Forward General of the Expedition Against the Enemy Slaves; Gu Shi and Tang Yu assisted him. Tang shipped supplies to Fu's base in Hanzhong from Xiangyang. Tang He was made General of the Western Expedition; Zhou Dexing and Liao Yongzhong assisted him. The Ming Dynasty's invasion from the north was overall more successful than the Yangzte invasion.

Northern invasion
Fu Youde captured Wenxian, Jiezhou, and the subprefectures of Wen, Long, and Mian in May 1371 before moving down the Jialing River valley. He then captured Long'an and Mianyang, with his general Lan Yu forcing the defenders south across the Luo River. This alarmed Ming Xia and naval forces were drawn from Qutang Gorge to counter Fu's advance. He defeated the Xia relief force and captured Hanzhou in July. Xia general Ding Shizhen stormed Wenzhou and killed Zhu Xianzhong in the same month. Although Chongqing fell in August and the Chengdu defenders were ordered to surrender, they did not receive the message in time. The Chengdu defenders decided to attack Fu with war elephants, but the elephants panicked and trampled many Xia soldiers. After the Chengdu defenders received news of Ming Sheng's surrender at Chongqing, Fu captured the city in September, concluding the war.

Yangtze invasion
Tang He and Liao Yongzhong's navies faced difficulties at Qutang Gorge, one of the Three Gorges on the eastern border of Sichuan. The Xia had set up suspension bridges across the Gorge and installed catapults on them. After a failed assault, Tang He refused to attack the intense resistance and he became bogged down in Daxikou. Liao Yongzhong eventually destroyed the bridges with cannon fire before capturing Qutang Gorge and Guizhou. Tang's army traveled by land and Liao's traveled by river. Xia officially surrendered when the two fleets reached Chongqing in August, though the war would go on for another month in Chengdu. Xia general Wu Yuren was captured after Baoning fell to Ming forces.

Aftermath
After the fall of Chongqing, Ming Sheng went to the capital of the Ming Dynasty, Nanjing, where he was made the Marquis Returned to Righteousness. He and Chen Li, Chen Youliang's youngest son, were exiled to Goryeo in February 1372 as they were beginning to rally dissidents. That autumn, a Branch Secretariat was established in Chengdu. The Hongwu Emperor publicly executed Xia general Wu Yuren in Nanjing; the other Xia generals had either drowned themselves while defending Chengdu to avoid capture or were made to garrison Xuzhou. Li Wenzhong supervised the construction of a new wall surrounding Chengdu. After the wall's construction, Huo Wenhui commanded the Chengdu garrison. Shi Chuanzhou, a self-proclaimed descendant of Ming Yuzhen, led a Xia loyalist aboriginal revolt in Guizhou in 1475.