Najafgarh was named after Mirza Najaf Khan (1723–1782) the commander-in-chief of the Mughal Army under King Shah Alam II. He marched several kilometers from the capital of Shahjahanabad to establish a military outpost, which would guard Delhi against attacks by British, Rohillas and Sikhs. He built a strong fort, in the suburbs beyond the capital city, and settled a small number of the Mughal here. That fort was later named Najafgarh. After the death of Najaf Khan, Najafgarh later became a fortified stronghold of the Rohilla Afghan chieftain Zabita Khan (b. 1785).