Ghazni, meaning jewel, is ancient city has withstood numerous military invasions. During the pre-Islamic period, the area was inhabited by various tribes who practiced different religions including Buddhism and Hinduism. Arab Muslims introduced Islam to Ghazni in the 7th century; they were followed by the 9th century Islamic conquest of the Saffarids from Zarang in the west. Sabuktigin made Ghazni the capital of the Ghaznavid Empire in the 10th century. The city was destroyed by one of the Ghurid rulers, but later rebuilt. It fell to a number of regional powers, including the Timurids and the Delhi Sultanate, until it became part of the Hotaki dynasty, which was followed by the Durrani Empire or modern Afghanistan.
During the First Anglo-Afghan War in the 19th century, Ghazni was partially destroyed by British-Indian forces. The city is currently being rebuilt by the Government of Afghanistan in remembrance of the Ghaznavid and Timurid era when it served as a major center of Islamic civilisation. The Afghan National Security Forces (ANSF) have established bases and check-points to deal with the Taliban insurgency.
Ghazni is a trading and transit hub in central Afghanistan. Agriculture is the dominant land use at 28%. In terms of built-up land area, vacant plots (33%) slightly outweigh residential area (31%). Districts 3 and 4 also have large institutional areas. The city of Ghazni has a population of 143,379 (2015) with 4 Police districts (nahia) and total land area of 3,330 hectares. There are 15,931 total number of dwellings in Ghazni city.
In 2013, ISESCO declared Ghazni the year's Islamic Capital of Culture.
The city was founded some time in antiquity as a small market town. It may be the Gazaca (Gázaca or Gāzaca) mentioned by Ptolemy, although he may have conflated it and Ganzak (also known as Gazaka), in Iran.