The history of the Uyghur people extends over more than two millennia and can be divided into four distinct phases: Pre-Imperial (300 BC – AD 630), Imperial (AD 630–840), Idiqut (AD 840–1200), and Mongol (AD 1209–1600), with perhaps a fifth modern phase running from the death of the Silk Road in AD 1600 until the present.

In brief, Uyghur history is the story of a small nomadic tribe from the Altai Mountains competing with rival powers in Central Asia, including other Altaic tribes, Indo-European empires from the south and west, and Sino-Tibetan empires to the east. After the collapse of the Uyghur Khaganate in AD 840, ancient Uyghurs resettled from Mongolia to the Tarim Basin and northern parts of China. Ultimately, the Uyghurs became civil servants administering the Mongol Empire.

Contested history The history of the Uyghur people, including their ethnic origin, is an issue of contention between Uyghur nationalists and Chinese authorities. Uyghur historians view Uyghurs as the original inhabitants of Xinjiang, with a long history. Uyghur politician and historian Muhammad Amin Bughra wrote in his book A history of East Turkestan, stressing the Turkic aspects of his people, that the Turks have a 9,000-year history, while historian Turgun Almas incorporated discoveries of Tarim mummies to conclude that Uyghurs have over 6,400 years of history. The World Uyghur Congress has claimed a 4,000-year history. However, the official Chinese view, as documented in the white paper History and Development of Xinjiang, asserts that the Uyghurs in Xinjiang formed after the collapse of the Uyghur Khaganate in ninth-century Mongolia, from the fusion of many different indigenous peoples of the Tarim Basin and the westward-migrating Old Uyghurs. The modern Uyghur language is not descended from Old Uyghur; rather, it is a descendant of the Karluk languages spoken by the Kara-Khanid Khanate.Arik, Kagan (2008). Austin, Peter (ed.). One Thousand Languages: Living, Endangered, and Lost (illustrated ed.). University of California Press. ISBN 978-0520255609. After the fall of the Uyghur Khaganate, most Uyghurs settled in the Tarim Basin, while smaller numbers settled in other parts of northern China, where they became known as the "Yellow Uyghurs" or Yugurs, and Salar people. "The bulk of the Uyghurs, and undoubtedly with them a small number of Türküt, migrated southwest into the Tarim Basin; fewer groups went southward into the immediate neighborhood of ambivalent China to the provinces of Kan-Su and Ts'ing-Hai (Kökö-nōr), where their descendants still live on as the Sary Yögur (Yellow Uyghurs) and Salar." During the Islamization of Xinjiang, the Chagatai Khanate, under Khizr Khoja (r. 1389–1399), declared a jihad (holy war) on the Buddhist Uyghurs of Qocho and forced the inhabitants to convert to Islam, which eventually led to the collapse of the Qocho. After the conversion of the Uyghurs, the term "Uyghur" would only be used to refer to the pre-Islamic Uyghurs. "Uyghur" would later reappear in 1921, when the Soviet Union took the 9th-century ethnonym from the Uyghur Khaganate, then reapplied it to all non-nomadic Turkic Muslims of Xinjiang.Ildikó Bellér-Hann (2007). Situating the Uyghurs between China and Central Asia. Ashgate Publishing, Ltd. p. 32. ISBN 978-0-7546-7041-4. Many modern Western scholars, however, do not consider modern Uyghurs to be of direct linear descent from the old Uyghur Khaganate of Mongolia; rather they believe them to be descendants of a number of peoples, of which the ancient Uyghurs are but one.

Some Uyghur nationalists claim that they are descended from the Tocharians. Well-preserved Tarim mummies of a people with European physical traits indicate the migration of an Indo-European people into the Tarim area at the beginning of the Bronze Age, around 2,000 BCE. These people probably spoke Tocharian and have been suggested by some to be the Yuezhi mentioned in ancient Chinese texts, who later founded the Kushan Empire. Qurban Wäli claims ancient words, written in Sogdian or Kharosthi scripts, to be "Uyghur" instead of Sogdian words absorbed into Uyghur, as proposed by more scrupulous linguists. page unnumbered quote: "Like the Chinese historians, the Uyghurs also resort to far-fetched interpretations ... In like fashion, the Uyghur archaeologist, linguist, and philologist Qurban Wäli affects to find "Uyghur" words written in Sogdian or Kharosthi scripts several thousands years ago. That a particular word is Uyghur, rather than a Sogdian word absorbed into Uyghur, as more scrupulous linguist would claim, proves that the Uyghurs and their language were already present in Xinjiang." Later migrations brought peoples from the west and northwest to the Xinjiang area, probably speakers of various Iranian languages, such as the Saka tribes. Other ancient people in the region mentioned in ancient Chinese texts include the Xiongnu, who fought for supremacy in the region against the Chinese for several hundred years. Some Uyghur nationalists claim descent from the Xiongnu (as well as being related to the White Huns); however, this view is contested by modern Chinese scholars. This Xiongnu claim originates from various Chinese historical texts: for example, according to the Chinese historical book Weishu, the founder of the Uyghurs was descended from a Xiongnu ruler.舊五代史 Jiu Wudai Shi, Chapter 138. Original text: 回鶻, 其先匈奴之種也.後魏時, 號爲鐵勒, 亦名回紇.唐元和四年, 本國可汗遣使上言, 改爲回鶻, 義取迴旋搏擊, 如鶻之迅捷也. Translation: Hui Hu [Uyghur], originally of Xiongnu stock. During Later Wei, they were called Tiele. They were also called Hui He. In the fourth year of the Yuanhe era, the Khan of their country sent an envoy to submit a request, and the name was changed to Hui Hu. It takes its meaning from turning round to strike rapidly like a falcon.

Pre-Imperial

Many historians trace the ancestry of modern Uyghur people to the Altaic pastoralists called Tiele, who lived in the valleys south of Lake Baikal and around the Yenisei River. The Tiele first appear in history in AD 357, under the Chinese ethnonym Gaoche, referring to the ox-drawn carts with distinctive high wheels used for yurt transportation. Tiele tribal territories had previously been occupied by the Dingling, an ancient Siberian people once subjugated by the Xiongnu, some of whom would be absorbed into the Tiele following the Xiongnu Empire's collapse. The Tiele practiced some agriculture and were highly developed metalsmiths due to the abundance of easily available iron ore in the Yenisei River. According to Duan Linaqin, the Dingling served as vassal metalsmiths to the Xiongnu, then later to the Rouran and Hepthalite states.Duan Lianqin, "Dingling, Gaoju and Tiele", p. 325–326.

The Book of Sui lists about forty Tiele tribes scattered throughout North and Central Asia, one being 韋紇 Weihe (< MC *ɦʷɨi- ɦet), a transcription of underlying *Uyγur:Suribadalaha, "New Studies of the Origins of the Mongols", p. 46–47.Cheng, Fangyi. "The Research on the Identification between the Tiele (鐵勒) and the Oğuric tribes" in Archivum Eurasiae Medii Aevi ed. Th. T. Allsen, P. B. Golden, R. K. Kovalev, A. P. Martinez. 19 (2012). Harrassowitz Verlag, Wiesbaden. p. 104-108

The ancestors of the Tiele were the descend[a]nts of the Xiongnu. There were many clans among the Tiele, who were compactly distributed along the valley from the east of the Western Sea. In the North of the Tola [Duluo 獨洛] river, there were Boqut (Pugu, 僕骨, MC buk-kuot), Toŋra (Tongluo, 同羅, MC duŋ-lɑ), Uyγur (Weihe, 韋紇, MC ɦʷɨi- ɦet), Bayirqu (Bayegu, 拔也古, MC bʷɑt-jja-kuo) and Fuluo (覆羅, MC phək-lɑ), whose leaders were all called Irkin (Sijin, 俟斤, MC ɖʐɨ-kɨn) by themselves. And there were other clans such as Mengchen (蒙陳, MC muŋ-ɖin), Turuhe (吐如紇, MC thuo-ɲjɷ-ɦet), Siqit (Sijie, 斯結, MC sie-ket), Qun (Hun, 渾, MC ɦuon) and Huxue (斛薛, MC ɦuk-siɛt). These clans had a powerful army of almost 20,000 men. In the west of Hami (Yiwu) [伊吾], North of Karashahr (Yanqi), and close to Aqtagh (Bai [White] Mountain), there were Qibi (契弊, CE khet-biɛi), Boluozhi (薄落職, CE bɑk-lɑk-tɕɨk), Yidie (乙咥, CE ʔˠit-tet), Supo (蘇婆, CE suo-bʷɑ), Nahe (那曷, CE nɑ-ɦɑt), Wuhuan (烏讙, CE ʔuo-hʷjɐn), Hegu (紇骨, CE ɦet-kuot), Yedie (也咥, CE jja-tet), Yunihuan (於尼讙, CE ʔuo-ɳi-hʷjɐn) and so on. These clans had powerful army of almost 20 thousands men. In the Southwest of Altai Mountain (Jin Mountain), there were Xueyantuo (薛延陀, CE siɛt-jiɛn-dɑ), Dieleer (咥勒兒, CE tet-lək-ɲie), Shipan (十槃, CE ʥip-bʷan), Daqi (達契, CE thɑt-khet) and so on, which have army of more than 10,000 men. In the north of Samarkand, close to Ade river, there were Hedie (訶咥, CE hɑ-tet), Hejie (曷嶻, CE ɦɑt-dzɑt), Bohu (撥忽, CE pʷɑt-huot), Bigan (比干, CE pi-kɑn), Juhai (具海, CE gju-həi), Hebixi (曷比悉, CE ɦɑt-pi-sit), Hecuosu (何嵯蘇, CE ɦɑ-ʣɑ-suo), Bayewei (拔也未, CE bʷɑt-jja-mʷɨi), Keda (渴達, CE khɑt-thɑt) and so on, which have an army of more than 30,000 men. In the east and west of Deyihai (得嶷海), there were Sulujie (蘇路羯, CE suoluo-kjɐt), Sansuoyan (三索咽, CE sɑm-sɑk-ʔet), Miecu (蔑促, CE met-tshjuok), Longhu (隆忽, CE ljuŋ-huot) and so on, more than 8,000 men. In the east of Fulin (拂菻), there were Enqu (恩屈, CE ʔən-kjut), Alan (阿蘭, CE ʔɑ-lɑn), Beirujiuli (北褥九離, CE pək-nuok-kɨu-lei), Fuwenhun (伏嗢昬, CE bɨu-ʔʷˠɛt-huon) and so on, almost 20,000 men. In the South of Northern Sea, there were Dubo (都波, CE tuo-pʷɑ) and so forth. Although there were so many different names of the clans, they were all called Tiele as a whole. There was no ruler among them, and they belonged to the Eastern and Western Türks, separately. They lived in unsettled places, and moved along with the water and grass. They were good at shooting on horseback, and were fierce and cruel, especially greedy. They live on plundering. The clans close to the west do several kinds of cultivating, and breed more cattle and sheep than horses. Since the establishment of the Türk state, the Tiele help the Türks by participating in battles everywhere, and subdue all the groups in the North.

[...]

Their customs were mostly like those of the Türks. The differences were that the husband should stay in his wife's family, and could not go home until the birth of his children. Also, the dead were to be buried. In the third year of Daye (607), the Tiele sent an envoy and tribute to the court, and never stopped contact from that year.

In AD 546, the Fufulo led the Tiele tribes in a struggle against the Türk tribe in the power vacuum left by the breakup of the Rouran state. As a result of this defeat, the Tiele were forced into servitude again. This incident marked the beginning of the historic Türk-Tiele animosity that plagued both Göktürk Khanates. (Note: at this time, Tiele replaces Gaoche in Chinese history.) At some point during their subjugation, nine Tiele tribes formed a coalition called Tokuz-Oguzes Nine-Tribes, which included the leading tribe, the Uyghurs, and eight allied tribes: Bugu, Hun, Bayegu, Tongluo, Sijie, Qibi, Abusi, and Gulunwugu(si)Tang Huiyao, vol. 98 txt: "天寶初.迴紇葉護逸標苾.襲滅突厥小殺之孫烏蘇米施可汗.未幾.自立為九姓可汗.由是至今兼九姓之號.[...] 其九姓一曰迴紇.二曰僕固.三曰渾.四曰拔曳固.即拔野古.五曰同羅.六曰思結.七曰契苾.以上七姓部.自國初以來.著在史傳.八曰阿布思.九曰骨崙屋骨恐.此二姓天寶後始與七姓齊列." engl. tr. "At the beginning of Tien-pao , the Hui-ho [Uighur] yabghu I-piao-pi surprised and destroyed the grandson of the little shad of the Turks, Ozmīš qaghan. Before long he set himself up as qaghan of the Chiu-hsing . From this time up to the present day they use the name Chiu-hsing as well [as the name Hui-ho ]. . . . The Chiu-hsing are: (1) Hui-ho [Uighur], (2) P'u-ku, (3) Hun, (4) Pah-yeh-ku, (5) Tung-lo, (6) Ssu-chieh, (7) Ch'i-pi - these seven tribes [ hsing-pu ] appear in historical records from the beginning of the dynasty. - (8) A-pu-ssu, (9) Ku-lun-wu-ku-[k'ong]. I [the editor of the text] suspect that the last two surnames [ hsing ] were first placed on an equality with the seven surnames after Tien-pao" (by Pulleyblank, 1956; quoted & cited in Senga 1990:58)