Jodhpur, was founded by Rao Jodha, the chief of a clan Known as the Rathores in 1459. The Afghan invader Mohammed Ghori drove the Rathores from their former homeland of Kannauj and they fled to Pali, a short way from Jodhpur.
Umaid Bhavan

It was the marriage between Rathore Siahji and the sister of a local prince that enabled the Rathores to prosper and establish a power base so strong that their capital at Mandore proved inadequate.

( Besides, it was easy to attack). The new place to they moved ofered more security with its natural fortifications and formidable fortress. Rao Jodha did the standard thing: he named the place after himself (jodhpur) and further prosperity of the clan, especially the expansion of their territory in Rajasthan

Jodhpur lies on the strategic Delhi-Gujrat trading route and the people benefited from the traffic of opium, copper, silk,sandelwood, dates and cofee. The trade boosted an economy scarred by military conquests.
The Mughals wanted a share of the riches and control of Jodhpur. The least bloody way was the marriage between Emperor Akbar and Rao Udai Singh's sister. The alliance ensured that the Rathores received military aid from the Mughals for their campaigns in Gujarat.But the Mughal alliance ran into problems after emperor Akbar's death. In the mid 17th century, Jaswant Singh joined Emperor Shah Jahan's forces against Aurengzeb pillaged Jodhpur and its citizens were forcibly converted to Islam.
Jaswant Singh's son Ajit Singh who was then the Maharaja, was murdered and the Mughals staked their claim to the thorne.
Meharangarh Fort
 His Infant son Ajit Singh II went underground and after 30 years in hiding in the hills, returned to jodhpur after Aurengzeb's death (1707) and recaptured the city of his birth.