According to the 1910 publication of the
Caucasian Calendar, Khojaly had 184 Tatar (i.e.
Azerbaijani) inhabitants in 1908. In the 1912 publication, Khojaly had 172 Tatar and 52
Russian inhabitants. During the
Soviet period, Khojaly was a village in the
Askeran District of the
Nagorno-Karabakh Autonomous Oblast.
First Nagorno-Karabakh War As the
First Nagorno-Karabakh War started, the Azerbaijani government began to implement a plan to create a new district center. From 1988 to 1990 the population of Khojaly increased from 2,135 to 6,000 residents, mostly consisting of immigrants from Soviet Central Asia (including more than 2,000
Meskhetian Turks) and immigrants from Armenia (about 2,000). In April 1990 the Azerbaijani government abolished the Nagorno-Karabakh Autonomous Oblast and its internal divisions. Khojaly was given city status and became the regional center for the newly created
Khojaly District composed of the former
Askeran District and part of the
Martuni District. The town had 6,300 Azerbaijani inhabitants in 1991. Most of the inhabitants fled during the town's capture by Armenian forces on 26 February 1992 during the
First Nagorno-Karabakh War and hundreds were killed in the
Khojaly massacre. The Khojaly massacre was the mass killing of
Azerbaijanis — mostly civilians, but also armed troops — by local irregular Armenian forces and the
366th Commonwealth of Independent States Guards Motor Rifle Regiment. It was one of the four events that defined the war, along with the Karabakh Armenian
seizure of Shusha and the
capture of Lachin and the Lachin corridor between Nagorno-Karabakh and Armenia as well as the June 1992 Azerbaijani
offensive against the Mardakert Province in
Nagorno-Karabakh. The death toll claimed by the Azerbaijani authorities is 613 civilians, including 106 women and 63 children. According to
Human Rights Watch, it resulted in death of at least 200 Azerbaijanis, though it is possible that as many as 500–1,000 may have died.
Republic of Artsakh After the First Nagorno-Karabakh War, the town became part of the
Askeran Province of the
Republic of Artsakh and the town was settled by Armenians. The town had an
Armenian-majority population of 908 inhabitants in 2005, and 1,397 inhabitants in 2015. Artsakh launched the construction of two new residential districts in the town in 2021, consisting of more than 400 apartments for displaced people from the village of
Mets Tagher (Boyuk Taghlar) in the
Hadrut Province.
Republic of Azerbaijan Khojaly came under Azerbaijani control on 24 September 2023, after the
2023 Azerbaijani offensive in Nagorno-Karabakh. On 15 October 2023,
President of the Republic of Azerbaijan Ilham Aliyev raised the
Azerbaijani national flag in Khojaly. On 28 May 2024, Aliyev presented apartment keys to the returning residents of Khojaly. As of February 2026, 144 Azerbaijani families, totaling 651 individuals, have been resettled in the town by Azerbaijan. == Historical heritage sites ==