Following the capture of Zhongdu in 1215, Genghis Khan sought to establish peaceful trade relations with the Khwarazmian Empire, a wealthy Islamic state ruling Central Asia and Persia. In 1218, Genghis Khan sent a large trade caravan of around 450 merchants. However, the governor of the frontier city of Otrar, Inalchuq, suspected them of spying and executed the entire caravan, seizing their valuable goods. When Genghis Khan sent ambassadors to demand justice, the Shah, Ala ad-Din Muhammad II, shaved the ambassadors' beards and sent them back, executing one of them. This diplomatic insult outraged the Great Khan, who immediately declared war.
In 1219, Genghis Khan mobilized a force of over 100,000 warriors, divided into several columns led by his sons Jochi, Chagatai, and Ögedei, and his top general Jebe. The Mongols bypassed the main desert paths and advanced unexpectedly from multiple directions, catching the Khwarazmians off guard. The Shah chose to disperse his superior numbers among various garrison cities rather than face the Mongols in a unified field army, allowing the Mongols to isolate and besiege the cities one by one.
The Mongol onslaught was swift and terrifying. Otrar was besieged and captured after five months, and its governor Inalchuq was executed. The Mongols then captured Bukhara and the capital Samarkand in 1220. Bukhara was set ablaze, and Samarkand's defenders were swiftly defeated. The Shah, Muhammad II, fled westward in panic, pursued by Genghis Khan's legendary generals Jebe and Subutai. He died exhausted on a small island in the Caspian Sea in late 1220. His son, Jalal al-Din, took up the resistance, winning a rare victory at Parwan before being pushed to the Indus River in 1221, where he made a legendary escape by leaping into the river. The campaign ended the independent Khwarazmian rule, solidifying Mongol control over Central Asia.