Kazakhstan was populated by nomadic Turkic tribes from the stone age pretty much until the Russians took over in the late 1700's. From that point, the Kazakhs protested the Russian rule and were consistantly beaten down by the Russians until the USSR collapsed, when they declared independence.
The (Mostly) Full Story:
The 2.7 million square miles now known as Kazakhstan, or Qazaqstan, was originally settled in the lower paleolithic era -- about 4 million years ago, the earliest period of human existence. As soon as people were around, they headed to Kazakhstan. And for a few million years, they didn't do very much of great interest to the casual reader. They wandered around, bred horses, farmed a little bit... you know, the usual.
The first well-documented settlement happened when the Mongolians decided to set up a nice little place during the 6th century. Pretty soon after, Turkish tribes settled down in eastern pre-Kazakhstan. In the following centuries, the Arabs would move into the south and bring some Islam into the area. Other, slightly later settlements were made by the Oghuz, Kimak, and Kipchak, who were all vaguely Turkic.
Some rather complicated tribal conflict occurred during the 11th century and lasted until Genghis Khan and his Mongol horde steamrollered across Kazakhstan and set up his Golden Horde as rulers. This lasted for a good old while, 'till the clan leaders broke away from the appointed rulers and formed a more cohesive precursor to the modern Kazakhs. The Mongol government fell apart, and the individual clans joined up to form three hordes.
The Great Horde chilled in southern Kazakhstan, the Middle Horde hung out in north-central Kazakhstan, and the Lesser Horde settled in western Kazakhstan.
Still battling the Mongols to some extent, the Kazakhs were too distracted to notice the Russians seizing bits of land and putting up forts in the northwest of the soon-to-be country, which started circa 17th century. Soon the Kazakhs were trapped between the Mongols and the Russians. The Lesser Horde attempted to ally with the Russians in 1730, which led to the Russians soon taking control of the Lesser Horde. The Middle Horde fell by 1798. The Great Horde held out until the Mongols got too severe, and they pretty much surrendered to the Russians, figuring that at least they were better than the Mongols. Almost immediately, the Kazakhs rose up against the Russians. There was general unrest in the area for years and years; you get the idea.
In 1863, the Russians started to annex countries in Central Asia, Kazakhstan included. By the 19th century, the Russian occupation was severely hurting the Kazakh economy because the construction of forts and the influx of Russian settlers limited the area where the still-moderately-nomadic people could drive their cattle. By the time WWI rolled around, the Kazakhs were hungry and pissed. They violently protested the Russian conscription of their people for the war, and Russia lay the smack-down on them, killing thousands.
The Horde of Alash tried in 1918 to establish an independant nation for the Kazakhs, but thought better of it a few years later and joined the Soviet Union in 1920. The Bolsheviks, in a fell stroke of genius, named the area the Kyrgyz Autonomous Soviet Socialist Republic. Later they changed it to the Kazakh Autonomous Soviet Socialist Republic because the Bolsheviks realized that country names need vowels. (Correction. A friend let me know, over the phone, months after this was originally published, that the Kyrgyz Autonomous Soviet Socialist Republic actually became Kyrgyzstan, and was moderately unrelated to Kazakhstan. I left the line in because I like it, goddamnit.) In 1936 the territory was made a full Soviet republic, the Kazakh SSR, also called Kazakhstan.
During WWII, Kazakhstan served as a storage shed for the USSR. Soviet citizens and industry went there first, seeking safety. Then the USSR started sending unpopular ethnic minorities there, to avoid the possibility of collaboration with the enemy. Kazahk grazing land was sold for the production of cereal grains from 1953-1965 under the Virgin Lands campaign. None of this made the Kazakhs very happy, I'm sure you realize.
The 1980s were rather crappy for the Kazakhs. Mikhail Gorbachev booted the leader of Kazakhistan, a native to the country despite his scumminess, and replaced him with a native Russian. This understandibly pissed off the Kazakhs, who rioted and were, as expected, beaten down by the USSR once again. Kazakhstan's economy slowly spiraled downward over the next few years, and nationalistic protests happened with increasing frequency. In 1990, the USSR allowed Kazakhstan a multiple-candidate election, the first since 1925. The Kazakhs elected many natives to office, unsettling the Russians.
In June 1990, the central government issued a statement about Kazakhstan that said, basically, "We 0wnz j00, n00bs" and otherwise declaring sovereignty. Kazakhstan declared her own sovereignty in response. It was a tense time. Both Kazakhs and Russians were demonstrating frequently. The Kazakh Parliament proclaimed their previously-elected leader chairman, then President of Kazakhstan. Strangely enough, the President had a positive outlook on the USSR, thinking that the republics were generally too weak to support themselves independently.
Gorbachev's power waned through 1991. In December of that year, the formerly-appointed President of Kazakhstan was voted in by an uncontested election. A week later, the USSR was dissolved, and Kazakhstan was officially an independent nation. On December 16, 1991 they passed the Law of the Republic of Kazakhstan on Independence, which basically is the Kazakhstan Declaration of Independence. On August 30, 1995 they adopted the Constitution of the Republic of Kazakhstan. All was good and shiny and well.
Right now, Kazakhstan is in a transitional stage between its USSR-imposed Communism and a more-desired free-market system. As compared to other former Soviet-bloc countries, their democratization (it is a word!) is admirable, but they still have a little ways to go in areas like civil rights and racial equality.
Thanks to those who /msg'ed me to help correct my sometimes-atrocious spelling.