How was Urdu born ?
Urdu is derived from Ghaznavid Persian, which is in turn derived from Avestan via Sassanid Pahlavi. It shall thence be evident that the ultimate ancestor of Urdu is Avestan, making it a member of the Iranian family of languages.
"If more than 60% of the words are common in Punjabi and Urdu (Shriram 1928:67) it is due to the influence of Persian." 
More detailed investigations only confirm the precurosry impressions. Indeed, several researchers have traced the origin of Urdu to the camps of Mahmud-e-Ghazni. Thus, K.K.Khullar notes:
"The birth of Urdu language was the direct result of the synthesis between the invading armies of Mahmud of Ghazni with the civilian population of the Indian cities. The word Urdu itself means Lashkar, derived from the Turkish language meaning armies." 
Indeed, the Ghaznavid origin of Urdu follows from the very name of the language - Zaban-e-Urdu, or "Language of the Armies". The word "Urdu" is derived from the Turkic "Oordou", meaning "camps" or, as Khullar notes above, "armies".
Urdu was thus self-evidently the language of the soldiers of the armies of Mahmud-e-Ghazni, the only militarist sovereign of the era who maintained a large enough army for a considerable period to provide sufficient time for a new language to develop. It is for this same reason that the earliest surviving Urdu literature is that of Sufi saints who accompanied the Ghaznavids during their expeditions.
Noted Iranologist Dr.E.C.Sachau, translator of al-Beruni's India, further elucidates the Ghaznavid origin of Urdu:
Dr.E.C.Sachau also notes the existence in the 1850s of remarkable Urdu manuscripts surviving from the Ghaznavid era:
"The first author who wrote in this language, the Dante of Muhammedan India, is one Masud, who died a little more than a century after the death of King Mahmud (525AH=1131 AD), cf A.Springer, Catalogue of the Arabic, Persian and Hindustany manuscripts of the libraries of the King of Oudh, Calcutta, 1854 pp.407,485. If we had any of the Hindi writings of those times, they would probably exhibit the same kind of Indian speech as found in Alberuni's book." 
Having traced the origin of Urdu to the camps of Mahmud-e-Ghazni, the identification of the "mother language" becomes the next necessity. The question of the origin of Urdu thus becomes linked to the language spoken by the soldiers of Mahmud. It is proposed that this source language for Urdu was Ghaznavid Dari.
Several facts support this view:
1. Ghazni is geographically located within the traditional Dari-speaking area of Afghanistan. Hence Dari was likely to have been spoken by many of Mahmud's soldiers.
2. The "Ghaznavi" dialect of Dari is still spoken .
3. Mahmud-e-Ghazni was a patron of Dari literature, hence he would have encouraged its usage amongst his soldiers.
4. Most soldiers in the Ghaznavid armies were of East Iranic stock, consisting of the local population of eastern Eranshahr, along with a substantial Turkic contribution.
5. Mahmud traced his descent to the Sassanids and Achaemenids:
"Subooktugeen [Ameer Nasir-Ood-Deen Subooktugeen Ghiznivy] is said to be lineally descended from Yezdijerd (the last of the Persian monarchs) who, when flying from his enemies during the Caliphate of Uthman, was murdered at a water-mill near the town of Merv. His family being left in Toorkistan formed connections among the people, and his decsndants became Toorks.
His genealogy is as follows: Subooktugeen, the son of Jookan, the son of Kuzil Hukum, the son of Kuzil Arslan, the son of Ferooz, the son of Yezdejird, the King of Persia." 
Mahmud was thus proud of his Iranian heritage - the blood of Cyrus the Great which flowed in his veins - and deliberately fashioned his empire in the mould of his Achaemenid and Sassanid ancestors. The Later Timurid Mughal Empire of Akbar and Aurangzeb was in turn the direct successor state of the Ghaznavid Empire, implying a direct historical parallel for the derivation of Urdu from Dari. For the lay Urdu speaker of today, the traditional descent of the Mughal Empire from the Ghaznavid Dynasty and thence from the Achaemenid Empire is the simplest historical proof of the Iranic origin of his language.
According to Ibn al-Muqaffa (translator of the Book of Kalila and Dimna) towards the end of the Sassanian Empire, three Iranic languages had developed in Eranshahr: "Parsi" (Avestan), "Pahlavi" and "Dari" .
Dari is generally viewed as "Vulgar Pahlavi", the vernacular spoken by the masses which developed as an offshoot of Sassanid Pahlavi. Dari is thus analogous to the "Vulgar Latin" stage in the development of Romance languages. Old East Iranic languages such as Bactrian (Bahlika of the Prakrit grammarians), Sogdian, Sakan (the Sacara of the Prakrit writers) and Tokharian (perhaps the ancestor of the Takki Apabhramsa of the Punjab) provided a substratum for Dari (a West Iranic language), while Turkic and Altaic provided a later superstratum.
Urdu, like all Iranic languages, is thus linguistically and historically derived from Avestan, which is for Iranian languages what Latin is for Romance languages. It should be considered a member of the Iranian branch of languages. A short language tree would be:
Avestan -> Pahlavi -> Dari -> Urdu.
This article should remove all doubts about the real origin of Urdu.
The greatest flourishing of northern Indian culture, art, and imperial strength undoubtedly took place during the reign of the Mughal monarchs of the 16th and 17th centuries. The Mughals were Central Asian descendents of the great Mongol warriors Ghengis Khan and Timur (Tamerlane), whose hordes of cavalry swept across the Eurasian steppe in the 13th and 14th centuries, conquering everything between Beijing and Budapest. But by the turn of the 16th century, the great Mongol empire has splintered; the many royal descendents of Ghengis and Timur fought over the territorial scraps and did their best to hold on to their own minor sultanates.
One of these sultans, Babur, was not satisfied with his small kingdom of Ferghana (now in modern-day Kyrgystan and eastern Uzbekistan), and he tried and tried again to permanently reconquer Timur's greatest prize, Samarkand. He never succeeded. So instead, Babur turned his attention south to the sultanate of Delhi in northern India, which had been ruled successively by five dynasties of muslim warriors from Afghanistan since the late 12th century. As history would show, Babur's campaign against the Delhi sultanate catalyzed the foundation of one of the greatest dynasties in the history of south Asia: the Mughal Empire.