Mahmud was the eldest son of Sabuktagin, surnamed Nasr-ud-din, in origin a Turkish slave, who had established his rule over the greater part of modern Afghanistan and Khorassan, with Ghazni as his capital.
In 1155 Bahram, the last of the Ghaznivide Turks, was overthrown by Ala-ud-din of Ghor, and the wealthy and populous city of Ghazni was razed to the ground.
The founder of the family is said to have been Izzud-din al Husain, whose son Ala-ud-din destroyed Ghazni, as already mentioned.
Ala-ud-din had two nephews, Ghiyas-ud-din and Muiz-ud-din, the latter of whom, also called Shahab-ud-din by Mussulman chroniclers, and generally known in history as Mahommed Ghori, is the second of the great Mahommedan conquerors of India.
His favourite residence is said to have been the old capital of Ghazni, while he governed his Indian conquests through the agency of a favourite slave, Kutb-ud-din.