The Mongol invasion of Western Xia was a series of battles in northwestern China between the Mongol Empire and the Tangut-led Western Xia kingdom. Genghis Khan, the Mongol leader, led some first attacks against Western Xia with the hopes of gaining both loot and a vassal state before launching a full-scale invasion in 1209. Thus, this was Genghis Khan's first major invasion and the first major Mongol invasion of China. After a nearly year-long siege of the city, Yinchuan, Tangut ruler Li Anquan surrendered in January 1210, although the diverted river unexpectedly flooded the Mongol camp. Western Xia helped the Mongols in the Mongol–Jin War for over a decade. When Genghis Khan conquered the Islamic Khwarazmian kingdom in 1219, Western Xia attempted to break away from the Empire and create an alliance with the Jin and Song dynasties. Genghis Khan was enraged by this betrayal and sent a second, punitive expedition into Western Xia in 1225. Genghis Khan's invasion gradually destroyed Western Xia cities and countryside, culminating in the siege of the capital in 1227 and excursions into Jin territory. Genghis Khan died in August 1227, near the end of the siege, for an unknown reason, but some versions claim he was killed in fighting against Western Xia. Yinchuan fell to the Mongols after his death, and the majority of the populace was murdered.
Ningxia, Gansu, eastern Qinghai, northern Shaanxi, northeastern Xinjiang, southwest Inner Mongolia, and southernmost Outer Mongolia in northwest China were ruled by the Western Xia dynasty, which began in 1038 and ruled over Ningxia, Gansu, eastern Qinghai, northern Shaanxi, northeastern Xinjiang, southwest Inner Mongolia, and southernmost Outer Mongolia. Western Xia, a minor state, fought the Liao dynasty to the east and northeast and the Song dynasty to the southeast, both larger and more powerful. Western Xia subsequently accepted tributary status to the nascent Jin Empire after the Jin dynasty ousted the Liao in 1115. Western Xia seized thousands of square kilometres of former Song land by assisting Jin in their wars against the Song. However, throughout time, the relationship between Western Xia and Jin deteriorated. Emperor Huanzong ascended to the throne after Emperor Renzong died, and Western Xia's strength began to wane. Despite being militarily weaker than Jin, the Western Xia had a great impact on the northern steppes. Because of tight commercial ties to the steppes and the possibility of exploiting the refugees as pawns in the Mongolian Plateau, the kingdom frequently welcomed ousted Kerait chiefs. Temujin, who would later become Genghis Khan, began strengthening his influence in Mongolia in the late 1190s and early 1200s. In 1203, Keriat commander Nilqa Senggum led a small band of followers into Western Xia following the death of Keraites chief Ong Khan to Temujin's rising Mongol Empire. Nilqa Senggum was banished from Western Xia land after his followers began robbing the natives.
Temujin used his opponent Nilga Senggum's brief exile in Western Xia to pretext for an attack against the state in the Edsin area in 1205. The Mongols pillaged border settlements, and one local Western Xia noble accepted Mongol sovereignty. During a raid on Ganzhou, the Mongols seized the city's commander's son (modern-day Zhangye). This young lad enlisted in the Mongol army and was given the Mongol name Chagaan, rising through the ranks to become the Temujin's personal guard commander. The Mongol Empire officially began the following year, when Temujin was formally declared Genghis Khan, ruler of all Mongols. Li Anquan executed Huanzong of Western Xia in a coup d'état and installed himself Emperor Xiangzong. Genghis Khan invaded the Ordo region in 1207 and sacked Wuhai, the biggest stronghold along the Yellow River, before leaving in 1208. Then Genghis began planning a full-scale invasion. He would obtain a tribute-paying vassal and control of caravan routes along the Silk Road, providing the Mongols with important revenue if he invaded Western Xia. He could also launch raids on the even wealthier Jin kingdom from Western Xia.
Genghis Khan launched his quest to capture Western Xia in 1209. Li Anquan requested assistance from the Jin dynasty. Still, Wanyan Yongji, the new Jin emperor, declined to assist, claiming that "When our adversaries attack each other, it is to our advantage. What is the source of the threat to us?" Genghis seized Wulahai after defeating an army led by Kao Liang-Hui outside the city. He then marched up the Yellow River, defeating other cities along the way, until he reached the citadel Kiemen, which defended the sole entrance through the Helan Mountains to the capital, Yinchuan. The Mongols made a retreat after a two-month standoff, leading the garrison, led by Wei-ming Ling-Kung, out onto the field, where they were quickly massacred. Genghis made his way to the capital, his path clear. Yinchuan was well-fortified, with 150,000 men, roughly twice the size of the Mongol force. However, the Mongols lacked the necessary equipment and experience to seize the city in one of their first attempts at siege warfare. They arrived in the city in May but were still unable to break through by October. The walls of Yinchuan were nearly broken by January 1210, as Genghis attempted to flood the capital by redirecting the river and its network of irrigation channels towards the city. The levee intended to redirect the river; however, it failed, and the resulting flood destroyed the Mongol camp, forcing the Mongols to seek higher ground. Despite this defeat, the Mongols continued to threaten Western Xia. With the state's crops decimated and no help from Jin, Li Anquan opted to submit to Mongol control, displaying his loyalty by marrying Genghis' daughter Chaka and paying a tribute of camels, falcons, and textiles.
Western Xia attacked the Jin dynasty in 1210 as retaliation for their failure to help them fight the Mongols. The Mongols joined Western Xia the following year and launched a 23-year battle against Jin. Shenzong gained control in the same year, and Li Anquan abdicated the throne and died. Despite assisting the Mongols to fight Jin, Western Xia refused to contribute troops to Genghis Khan's Central Asian wars in 1217. The Mongols besieged the capital as a warning before retreating. In 1219, Genghis Khan began a campaign in Central Asia against the Khwarazmian kingdom, requesting military assistance from Western Xia. The emperor and his military commander Asha, on the other hand, refused to participate in the campaign, claiming that if Genghis had insufficient forces to assault Khwarazm, he had no claim to absolute power. Genghis vowed vengeance and set out to invade Khwarazm, while Western Xia tried to form alliances with the Jin and Song kingdoms to counter the Mongols.
Genghis prepared his soldiers to punish Western Xia for their betrayal after defeating Khwarazm in 1221. In the meantime, Emperor Shenzong surrendered in 1223, leaving his son, Xianzong, in charge. Genghis Khan attacked in 1225 with a force of around 180,000. Following their conquest of Khara-Khoto, the Mongols resumed a steady march southward. Asha, the Western Xia army commander, could not afford to meet the Mongols because it would entail a 500-kilometre march westward from Yinchuan's city. With no army to fight them in a pitched battle, the Mongols chose the best cities to attack, and when each one fell, the Mongols drew on prisoners, defectors, supplies, and weapons to conquer the next one. Enraged by Western Xia's tenacious resistance, Genghis waged annihilative warfare against the countryside, ordering his generals to destroy cities and garrisons as they marched systematically. The Mongols arrived at a place about 300 kilometres south of Khara-Khoto, where the Qilian Mountains force the Etsin River eastward, two months after capturing Khara-Khoto. Genghis separated his army at this juncture, assigning general Subutai to look after the westernmost cities while the main force advanced east into the heart of the Western Xia Empire. Suzhou was besieged by Genghis Khan and fell after five weeks. Then Genghis proceeded to Ganzhou, where his general Chagaan was born. Chagaan attempted to negotiate with his father, who still commanded the city garrison. However, the city's second-in-command staged a coup, assassinated Chagaan's father, and refused to submit. The city took five months to conquer, and despite Genghis' threats of revenge, Chagaan persuaded him only to slaughter the 35 conspirators who had murdered Chagaan's father. Genghis Khan took refuge in the Qilian Mountains in August 1226 as his army approached Wuwei, the Western Xia empire's second-largest city. Wuwei decided to surrender to prevent imminent devastation after receiving no aid from the capital. Emperor Xianzong died at this moment, leaving Mozhu to deal with a deteriorating situation as the Mongols encroached on the city. In the autumn, Genghis reassembled his forces, conquered Liangchow, crossed the Helan Shan desert, and besieged Lingwu, only 30 kilometres from Yinchuan. Western Xia led a counter-offensive with an estimated army of over 300,000 warriors along the frozen river and canal systems banks in the Battle of Yellow River. The Mongols annihilated the Western Xia forces, with 300,000 Western Xia men being killed in the fight. Genghis prepared to invade the Jin dynasty after reaching Yinchuan in 1227 and laying siege to the city to minimize any threat of sending relief forces to Western Xia and set the ground for a final conquest of the Jin empire. Genghis despatched an army south, led by his son Ogedai and commander Chagaan, into Jin territory around the Wei River and southern Shaanxi, even moving some troops across the Qin Mountains to threaten Kaifeng, the Jin capital. Genghis reunited with Subedai and went southwest, slicing through a 150-kilometre-wide area centred on modern-day Ningxia and Gansu. Subedai captured the Tao River valley and the Lanzhou region by crossing the northern portions of the Liupan mountain range, zigzagging from town to town in February and March.
Meanwhile, Genghis Khan followed the Qing Shui River to the south. Back in Western Xia, Yinchuan had been besieged for roughly six months, and Genghis despatched Chagaan to negotiate terms while supervising a siege of Longde. The emperor decided to concede but requested a month to prepare adequate gifts, according to Chagaan. Although Genghis consented, he secretly plotted to assassinate the emperor. During the peace talks, Genghis Khan maintained his military activities around the Liupan mountains near Guyuan, rejected Jin's offer of peace, and planned to invade them near the Song's border. However, in August 1227, Genghis Khan died of an unknown cause, and his death was kept a secret to avoid jeopardizing the ongoing campaign. Emperor Mozhu surrendered to the Mongols in September 1227 and was quickly executed. The Mongols then pillaged Yinchuan savagely, slaughtering the city's populace and plundering the imperial tombs west of the city, effectively destroying the Western Xia state.
At the fall of Yinchuan in August 1227, Genghis Khan died. The actual reason for his death is unknown; however, it has been suggested that he was killed in action by Western Xia, that he fell from his horse, died of disease, or died of wounds acquired while hunting or fighting. According to the Galician-Volhynian Chronicle, he was killed in combat by the Western Xia. In contrast, Marco Polo claimed he died from an infection caused by an arrow wound he suffered during his final expedition. Later Mongol accounts link Genghis' death to the capture of a Western Xia princess as war loot. One early-seventeenth-century chronicle even claims that the princess hid a little knife and stabbed him. However, other Mongol authors have questioned this version, believing it to be a fabrication by the rival Oirads.
Western Xia was nearly destroyed during the second campaign. According to John Man, Western Xia is barely recognized outside of scholars in the topic because Genghis Khan's program called for their utter elimination. According to him, "There's a case to be made that this was the first instance of attempted genocide ever documented. It was unquestionably a highly successful ethnocide." Certain members of the Western Xia royal clan, on the other hand, went to western Sichuan, northern Tibet, and probably northeast India, becoming local kings in some cases. Other Western Xia inhabitants settled in the modern provinces of Henan and Hebei.
In contrast, a minor Western Xia state was created in Tibet around the upper reaches of the Yarlung River. The Western Xia dynasty continued to exist in China until the middle of the Ming dynasty. Despite Genghis' death, the Mongol Empire was finally victorious over Western Xia. As a result, Genghis Khan's successors focused their efforts on uniting the remainder of China. The Jin dynasty, which had already suffered significant territorial and military losses due to the continuous Mongol invasion from 1211, eventually fell apart in 1234. The Kingdom of Dali in southwest China was invaded in 1253, and the Song dynasty of southern China succumbed in 1279, after a four-decade struggle that began in 1235.