[4] According to linguist Gerhard Doerfer, Mahmud al-Kashgari was the first person mentioning the Khalaj people in his Dīwān Lughāt al-Turk: Turkologist Yury Zuev stated that *Qalaç resulted from *Halaç, owing to the sound-change of prothetic *h- to *q-, typical in many medieval Turkic dialects, and traced Halaç's etymology back to ala, alač, alaça "motley, piebald".
"[17] Ilkhanate's statesman and historian Rashid-al-Din Hamadani mentions the Khalaj tribe in his 14th century Jami' al-tawarikh as part of the Oghuz (Turkoman): Over time, these peoples were divided into numerous clans, [and indeed] in every era [new] subdivisions arose from each division, and each for a specific reason and occasion received its name and nickname, like the Oghuz, who are now generally called the Turkmens [Turkoman], they are also divided into Kipchaks, Kalach, Kanly, Karluk and other tribes related to them.
11th-century book Tarikh Yamini, written by al-Utbi, stated that when the Ghaznavid Emir Sabuktigin defeated the Hindu Shahi ruler Jayapala in 988, the Khalaj and Pashtuns (Afghans) between Laghman and Peshawar, the territory he conquered, surrendered and agreed to serve him.
Al-Utbi further stated that Khalaj and Pashtun tribesmen were recruited in significant numbers by the Ghaznavid Sultan Mahmud of Ghazni (999–1030) to take part in his military conquests, including his expedition to Tokharistan.
Ighraq's army, as well as many other Khalaj and other tribesmen, joined the Khwarazmian force of Jalal ad-Din and inflicted a crushing defeat on the Mongols at the 1221 Battle of Parwan.
However, after the victory, the Khalaj, Turkmens, and Ghoris in the army quarreled with the Khwarazmians over the booty, and finally left, soon after which Jalal ad-Din was defeated by Genghis Khan at the Battle of the Indus and forced to flee to India.
Ighraq returned to Peshawar, but later Mongol detachments defeated the 20,000–30,000 strong Khalaj, Turkmen, and Ghori tribesmen who had abandoned Jalal ad-Din.
13th-century Tarikh-i Jahangushay, written by historian Ata-Malik Juvayni, narrated that a levy comprising the "Khalaj of Ghazni" and Pashtuns were mobilized by the Mongols to take part in a punitive expedition sent to Merv in present-day Turkmenistan.