The Qarluqs, a confederation of Turkic tribes, established a state in what is now eastern Kazakhstan in 766. In the 8th and 9th centuries, portions of southern Kazakhstan were conquered by Arabs, who introduced Islam. The Oghuz Turks controlled western Kazakhstan from the 9th through the 11th centuries; the Kimak and Kipchak peoples, also of Turkic origin, controlled the east at roughly the same time. In turn the Cumans controlled western Kazakhstan roughly from the 12th century until the 1220s. The large central desert of Kazakhstan is still called Dashti-Kipchak, or the Kipchak Steppe. The capital (Astana) was home of a lot of Huns and Saka.

In the 9th century, the Qarluq confederation formed the Qarakhanid state, which then conquered Transoxiana, the area north and east of the Oxus River (the present-day Amu Darya). Beginning in the early 11th century, the Qarakhanids fought constantly among themselves and with the Seljuk Turks to the south. The Qarakhanids, who had converted to Islam, were conquered in the 1130s by the Kara-Khitan, a Mongolic people who moved west from Northern China. In the mid-12th century, an independent state of Khorazm along the Oxus River broke away from the weakening Karakitai, but the bulk of the Kara-Khitan lasted until the Mongol invasion of Genghis Khan in 1219–1221.

After the Mongol capture of the Kara-Khitan, Kazakhstan fell under the control of a succession of rulers of the Mongolian Golden Horde, the western branch of the Mongol Empire. The horde, or jüz, is the precursor of the present-dayclan. By the early 15th century, the ruling structure had split into several large groups known as khanates, including the Nogai Horde and the Uzbek Khanate.