Before the history @DominicY described, Chechnya had a long history of being messed with and/or involved in territorial struggles with/between Russia, the Ottoman Empire (Turkey), Iran and Persia. Major changes included:
’‘Chechnya was a nation in the Northern Caucasus that fought against foreign rule continually since the 15th century.’’
Circa 1864–1867: Ethnic cleansing by Russia, much of it by exodus towards the Ottoman Empire (now Turkey), involving others too, but Chechnyans in Chechnya reduced by perhaps 80%.
1917: Russia collapsed under attack by Germany and the Russian Revolution. Chechnya, Ingushetia and Dagestan declared independence from Russia and formed an independent Mountainous Republic of the Northern Caucasus, which was internationally recognized but then…
1912: The Mountainous Republic of the Northern Caucasus was invaded by the Soviet Union and absorbed into it.
1930s: Many starving Ukranians moved into the now-called “Chechen-Ingush Autonomous Soviet Socialist Republic”. The “Autonomous” part smacks of Russian overlord humor to me.
1940–1944: Trying to take advantage of wars between the USSR and Finland and Germany, there were peaks in insurgent uprisings aimed at regaining independence.
1944–1948: The USSR under Josef Stalin declared the Chechen-Ingush Autonomous Soviet Socialist Republic disbanded, and tried to deport (or in some cases, kill) as many Chechnyans out of Chechnya as they can. Looks like about 500,000 Chechnyans were deported and maybe (hard to get reliable or even consistent numbers from USSR archives) 200,000 Chechnyans killed, and hundreds of thousands of other ethnicities were also removed from Chechnya.
1957: Nice-guy Nikita Khrushchev restored the Republic.
1990: The republic declared its sovereignty.
1991: An independent Chechen-Ingush Republic declared itself.