The formation of the Kazakh Khanate was complicated by the nature, long in time; it was a multi-dimensional process. It was also the natural result of the socio-economic and ethno-political events in the vast territory of East Desht-i Qipchaq, Zhetysu, and Turkestan (southern Kazakhstan). Formation of a single economic region in the XIV - XV centuries, on the basis of the natural integration of areas with a mixed economy, a nomadic pastoralist and sedentary agricultural, urban and with the direction on trade and craft sector, prepared the way for the unification of all the lands of the region into one political structure.
A specific course of formation of the Kazakh Khanate associated with a internal political state of two countries on the territory of Kazakhstan - Abulkhair Khanat (State of Uzbek nomads) and Mogolistan. In both countries, economic power of the nomadic elite increased, and its centrifugal aspirations grew. The most influential leaders of clans and tribes of East Desht-i Qipchaq and Zhetysu wanted political independence.
Back in the 20's of XV century, Kalmaks began to attack Zhetysu in search of grazing, mining, entering shopping malls. Abulkhair Khan suffered a severe defeat from them in 1457. Making peace with Abulkhair in heavy conditions, Kalmaks went through Chu to their land, and Abulkhair began with brutal measures restoring order in his uluses, including the south of Kazakhstan, where he cracked down does not recognizing his authority Juchids. Actions of Abulkhair and the inability of Mogolistan Khan to protect the population of Zhetysu from kalmak hordes, had led to even more frustration of the masses.
From the late 50s of the XV century, there was a mass shifting of the Kazakh population of East Desht-i Qipchaq, oases of Turkestan and the foothills of Karatau to the western part of the Zhetysu, the territory of Mogolistan, within a decade. It is especially intensified after the death of Abulkhair in 1468 and the collapse of his government. This action of the masses was the beginning of the subsequent unification of disparate groups of Kazakhs, including ones from Zhetysu in one state.
Kazakh Khanate was originally occupied the territory of the West Zhetusy, Chu and Talas valley. It combined both moved from the Central and Southern Kazakhstan Kazakhs and local tribes. A friendly disposition of Khan of mogols towards sultans from Uzbek uluses was due to the fact that, firstly, Esen-Bug did not have at that time strength to reflect raidings of the northern nomads, secondly, represented by Kerey, Janibek and their soldiers, he saw a stronghold for protection of the western borders from the possessions of his brother Yunus supported by the Timurid Abu Said.
Another reason that made Esen-Bug to take such a step could be the fact that the value of Khan both internally and externally is primarily determined by the number and strength of supporting him feudal nobility and ulus people. So, it was natural that he desired to attract the enemies of his powerful neighbors, and to use them if it was needed, against their fellow tribesmen. After the death of Esen Bug in 1462, anarchy came to Mogolistan. In these circumstances, the emergence and consolidation of the Kazakh Khanate in Zhetusy was quite natural. Mohammed Haydar Dulati considers the formation of the Kazakh Khanate in 870 year of the Hijra (1465 – 1466 years).
In the following decades of the XV century, Kazakh Khanate economically strengthened and expanded geographically. Its territory included a significant part of the territory of the ethnic Kazakhs. Abulkhair Khan’s Khanate got away from the scene in East Desht-i Qipchaq. At the end of XV and early XVI centuries, a military and political power of the Timurid state became the thing of the past as it finally lost its power over Mawarannahr against the leader of the nomadic Uzbeks grandson of Abulkhair, Muhammad Shaybani. Mogolistan, actually, split out into several fiefdoms.
According to the ancestries placed in a number of sources, Janibek and Kerey were close relatives. Both were direct descendants of Urus Khan and had a right to rule, one as a direct descendant of the Barak Khan (Janibek - Barak Khan - Kuyruchuk oglan - Urus Khan), the other as the eldest (Kerey - Bulat Sultan - Sultan Tokhta Kyya - Urus Khan ).
Kazakh khans immediately intervened in the struggle for power in the stepp eafter the death of Abulkhair Khan. Their main opponents were the heirs of Abulkhair Khan - his son Shaykh - Haidar and grandchildren Muhammad Shaibani and Mahmud - sultan. After the death of Shaykh - Haydar, Abulkhair’s grandchildren escaped to Turkestan, where they received help from the Timurid governor Mazid-tarkhan. The main events in the history of the Kazakh Khanate in the last third of the XV century that determined the fate of the young state played out in this region.
Syr Darya and Karatau district were the closest to the possessions of the Kazakh khans in West Zhetysu. Janibek and Kerey Khan primarily sought to have a right to these lands as they owned them by inheritance, including the city of Suzak, Sygnak, etc. But the main reason of Khans-Juchids fight for power over East Desht-i Qipchaq waged not so much in the steppe, but in Turkestan, was the economic and strategic importance of the region.
There were several major battles - under Sauran, Suzak, near the Sogunluk pass in the mountains Karatau, and among other places in the 70-ies. Yasa (Turkestan), Sygnak was captured by Kazakh khans, then by Muhammad Shaybani.
One of the prominent leaders of Kazakh troops in this period was the Kerey Khan’s son, Burunduk. The circumstances and the exact time of the transition of the power in the hands of the Burunduk khan is not known. Ibn Ruzbikhan, speaking of the events of the early 70-ies of the XV century, notes that "in Kazakh Uluses sultans claimed the khan's authority. After a while this rank belonged to several persons, turn to be khan got Burunduk Khan."
In the 80th - 90th years struggle for cities of Syr Dariya and their oases continued with varying success. Kazakhs as Uzbeks-shaybanids repeatedly besieged Sygnak and Yasa, Arkuk and Sauran, and often the siege lasted for several months. The outcome of the fight by the end of the XV century was the inclusion in the Kazakh Khanate Suzak, Signak, Sauran cities. Mohammed Shaibani kept in his hands Otyrar, Yasi, Uzgend, Arkuk.
Joining of the oases near Syr Darya to the Kazakh Khanate was the key to the success in the unification of the country by the Kazakh khans. By the end of the XV century, the original boundaries of the state expanded. It includes in addition to West Zhetysu and the above-mentioned cities in South Kazakhstan region, Karatau with surrounding steppe areas, the lower reaches of the Syr Darya and Northern Aral Sea, a large part of central Kazakhstan.