Jahanghir Khoja, Jāhangīr Khwāja or Jihangir Khoja (Uyghur: جهانگیر خوجا, جهانگير خوجة; traditional Chinese: 張格爾; simplified Chinese: 张格尔; pinyin: Zhānggé'ěr; 1788 – 1828), was a member of the influential Afaqi khoja clan, who managed to wrest Kashgaria from the Qing Empire's power for a few years in the 1820s but was eventually defeated and executed.
Burhan ad-Din, a Khoja of the White Mountain faction, was the grandfather of Jahangir. Before rebellion broke out in May 1826 and during a fortuitously timed earthquake that destroyed most towns in the Ferghana Valley, Jahangir Khoja managed to flee to Kashgar from Kokand, where he had been held in prison in accordance with a secret agreement concluded between the Khanate of Kokand and Qing dynasty China concerning descendants of Appak Khoja.[note 1] Among Jahangir's troops were Kyrghyz, Tajiks and White Mountain fighters. After appearing in Kashgar with only several hundred of his followers, he quickly increased his force with volunteers and within several months had collected about 200,000 troops under his banner.[note 2] Jahangir Khoja overthrew Qing power in Kashgar, Yarkand, Khotan, Kargalik, Yangi Hissar and Maralbashi, having annihilated the Qing garrisons in these 6 cities of West Kashgaria. Hui Muslims were targeted in slave raids by Muslims of the Kokand Khanate. Enslavement didn't depend on religious status but political allegiance, since Turkic Muslim Ishaqi and Turfanis who served the Qing against fellow Turkic Muslim Afaqi and Khokandis were also enslaved by their fellow Turkic Muslims led by Jahangir. Kashgari Muslims purchased Ghalcha Mountain Tajiks as slaves. His forces captured several hundred Chinese Muslims (Dungan or Hui), who were taken to Kokand. Tajiks bought two Chinese slaves from Shaanxi whom they enslaved for a year before Tajik Beg Ku-bu-te returned them to China. All Chinese captured—including merchants and 300 soldiers Janhangir captured in Kashgar—had their queues cut off when brought to Kokand and Central Asia as prisoners. It was reported that many of the Chinese Muslim merchant captives became slaves themselves, with accounts of Chinese Muslim slavery in Central Asia increasing. The queues were removed from Chinese Muslim prisoners and then sold or given to various owners; one of them, Nian, ended up as a slave to Prince Batur Khan of Bukhara. Omar Khan ended up owning Liu Qifeng and Wu Erqi. The others—Zhu, Tian Li and Ma Tianxi—ended up with various owners but plotted an escape. The Russians record an incident in which they rescued the Chinese Muslim merchants who had escaped after they were sold by Jahangir's army in Central Asia and sent them back to China.
Nevertheless, the Qing Daoguang Emperor managed to mobilize "all forces of the Empire, that were put into motion" and by September 1827 had assembled an army of 70,000 in Aksu under the command of General of Ili Chang Ling. In January 1828 this Army moved against Jahangir Khoja. Other sources say that the Chinese governor led 80,000 Chinese Muslim troops against Jahangir. Jahingir's forces were defeated within one month at a decisive battle on the banks of the Tuman River north of Kashgar. Although his forces during the battle outnumbered those of the Qing, the latter were much better organized, being a regular state army. Jahangir had not created a regular army and had disbanded his voluntary army after gaining control of Western Kashgaria and taking the Gulbagh Qing Fortress in Kashgar at the beginning of 1827, when he had slaughtered all its defenders (about 12,000 Manchu and Chinese troops and members of their families). After receiving word that a Qing army was on its way to Kashgar, Jahangir again mustered voluntary troops. This army had no artillery units, despite having captured the six large cannons of the Gulbagh fortress, which were not brought and used in the battle. By contrast, Qing troops applied well-organized intense cannon fire across the Tuman River on Jahangir's positions, sending his troops reeling into confusion. Mercenaries from Badakhshan, Kokand and Kunduz fled first, then the Kashgarians lost ground. Qing troops rushed to Kashgar and, upon entering the city, embarked on the wholesale massacre of the local population of about 20,000 civilians. On January 29, 1828, Jahangir managed to escape and hide himself in the mountainous Alay Valley among the Kyrgyz people. Daoguang Emperor was dissatisfied with this turn of events and wrote to Chang Ling: I sent an army to eliminate the evil itself, you were at the lair of the beast, but let him to escape, now all previous victories have no any value, because he is still alive, the germ of the future rebellions.  Jahangir's capture resulted from the treachery of the former Kyrgyz Hakim of Kashgar, Ishak Khoja, who sent a misleading letter to Jahangir telling him that the main body of Qing troops had departed and inviting him to Kashgar to regain power. When Jahangir heard the news he hurried back to Kashgar but was ambushed by Qing troops under the General of Ili, captured and delivered to Beijing. There he was exposed to the attention of China's capital's population, being carried for several weeks in a mobile iron cage through the main streets of Beijing. Finally he was brought to the Daoguang Emperor for interrogation but, having gone mad due to bad treatment, he was unable to answer any questions. Immediately after the interrogation was completed he was executed by slicing (Lingchi). Jahangir Khoja's body was cut into numerous pieces and his bones thrown to the local dogs. His portrait was buried in the hill near Beijing. He was 40 years old at the time of his death.
With Jahangir dead, the Chinese decided to punish the Khokandians for their sympathy with the Khojas and imposed restrictions on their exports to Kashgar. In retaliation, at the behest of Muhammad Ali Khan, the Khan of Kokand, Yusuf Khoja (خواجہ یوسف) became ruler of what was at that time known in the west as Chinese Turkestan. Jahangir's invasion led to a change in policy and Han settlement was allowed in the Tarim Basin after his invasion whereas before the invasion, Han were not allowed to permanently settle in the Tarim Basin.
- This agreement, according to M. Kutlukov, was concluded first by Kokand ruler Irdana Biy (1751–70) as soon as the Qing became aware of Sarymsaq Khoja (an Ak Taghlik who was the only person among Appak Khoja's descendants to survive the 1757–59 Qing invasion of Kashgaria), who, via Kabul and Badakhshan, had arrived in Kokand and settled there. The agreement was confirmed later by the following Kokand rulers: Narbuta Biy (1770–98), Alim Khan (1798–1810) Omar Khan (1810–22) and Muhammad Ali Khan (1822–42). The rulers of Kokand promised in the agreement to hold all Appak Khoja descendants under observation, restrict their activities and not let them leave Kokand. In exchange, Kokand received every year a definite amount of silver, quantities varied from 250 up to 1000 ingots (yamboos), and tea. Kokand traders were also granted trade privileges in Kashgaria. Jahangir Khoja (1788–1828) was a son of Sarymsaq Khoja.
- Among volunteers in Jahangir's army were a lot of ghalchas (Mountain Tajiks), whose tight black costume gave rise to the rumours in Siberia about the presence of Europeans among Jahangir's troops; those rumours were also circulated by the Russian foreign intelligence Service, upset at the possible opportunity gained by British forces in India due to this rebellion; they claimed that there were 13 British bodyguards of Jahangir Khoja, seven of whom followed him wherever he went at all times (a fact not confirmed by local sources). According to Russian sources, Jahangir's uprising was completely quelled by China by the summer of 1828.
- Encyclopædia Britannica Eleventh Edition, article on Kashgar
- Kim (2003)
- Robert J. Antony, Jane Kate Leonard (2002). Dragons, tigers, and dogs: Qing crisis management and the boundaries of state power in late imperial China. East Asia Program, Cornell University. p. 282. ISBN 1-885445-43-1. Retrieved 2010-11-28.
- Clarence-Smith, W. G. (2006). Islam and the Abolition of Slavery (illustrated ed.). Oxford University Press. p. 45. ISBN 0195221516.
- NEWBY, L. J. (2013). "Bondage on Qing China's Northwestern Frontier". Modern Asian Studies. 47 (3): 974. doi:10.1017/S0026749X12000261. JSTOR 24494172. S2CID 144623444.
- NEWBY, L. J. (2013). "Bondage on Qing China's Northwestern Frontier". Modern Asian Studies. 47 (3): 975. doi:10.1017/S0026749X12000261. JSTOR 24494172. S2CID 144623444.
- Millward 1998, p. 298.
- Millward 1998, p. 205.
- Millward 1998, p. 305.
- Newby, Laura (2005). The Empire and the Khanate: a political history of Qing relations with Khoqand c. 1760-1860. BRILL. p. 97. ISBN 90-04-14550-8. Retrieved 2010-11-28.
- Fairbank, John King (1978). The Cambridge History of China: Late Chʻing, 1800–1911, pt. 1. Cambridge University Press. p. 371. ISBN 9780521214476. Retrieved 2010-11-28.
- Millward 1998, p. 168.
- Millward 1998, p. 285.
- Tyler, Christian (2004). Wild West China: the taming of Xinjiang. New Brunswick, New Jersey: Rutgers University Press. p. 66. ISBN 0-8135-3533-6. Retrieved 2010-11-28.
- M. Kutlukov. Relations between Kokand Khanate and Qing China. Nauka Publishing House of Main Redaction of Eastern Literature, Moscow, 1982, page 207.
- Rian Thum (13 October 2014). The Sacred Routes of Uyghur History. Harvard University Press. pp. 167–. ISBN 978-0-674-59855-3.
- Lansdell, Henry (1894). Chinese Central Asia A Ride to Little Tibet. Vol. II. p. 56.
- Kutlukov, M. (1982). Relations between Khanate of Kokand and Qing China. Moscow, USSR: Nauka.
- Millward, James A. (1998). Beyond the Pass: Economy, Ethnicity, and Empire in Qing Central Asia, 1759–1864. Stanford, CA: Stanford University Press. ISBN 9780804729338.
- Hodong, Kim, Holy War in China: The Muslim Rebellion and State in Chinese Central Asia, 1864-1877. Stanford University Press (March 2004). ISBN 0-8047-4884-5. (Searchable text available on Amazon.com)
- Grum-Grzimajlo, G., Eastern Turkestan[permanent dead link] in Brockhaus and Efron Encyclopedic Dictionary (in Russian)