The city's history is as old as the epic Mahabharata. The city was known as Indraprastha, where the Pandavas lived. Over time, in eight cities with more came to life near Indraprastha, Lal Kot, Siri, Dinpanah, Quila Rai Pithora, Ferozabad, Jahanpanah, Tughlakabad and Shahjahanabad.
Delhi has witnessed political turmoil for more than five centuries. It was ruled by the Mughals in succession Khiljis and Tughlaq.
In 1192 the legions of the Afghan warrior Muhammad of Ghori captured the Rajput town, and the Delhi Sultanate was established (1206). The invasion of Delhi by Timur in 1398 put an end to the sultanate; the Lodis, last of the Delhi sultans, gave way to Babur, who, after the battle of Panipat in 1526, founded the Mughal Empire. The early Mughal emperors favoured Agra as their capital, and Delhi became their permanent seat only after Shah Jahan built (1638) the walls of Old Delhi.
From Hindu Kings to Muslim Sultans, the reins of the city kept shifting from one ruler to another. The soils of the city smell of blood, sacrifices and love for the nation. The old 'Havelis' and edifices from the past stand silent but their silence also speaks volumes for their owners and people who lived here centuries back.
In the year 1803 AD, the city came under the British rule. In 1911, British shifted their capital from Calcutta to Delhi. It again became the center of all the governing activities. But, the city has the reputation of over throwing the occupants of its throne. It included the British and the current political parties that have had the honour of leading free India.
After independence in 1947, New Delhi was officially declared as the Capital of India.
Resources : Govt. of India
Quite Informative :)
Good post about the history of Delhi :)