History of Gurdaspur District describes that Gurdaspur was founded by Guriya Ji in the beginning of 17th century. On his name, this city was named as Gurdaspur. He bought land for Gurdaspur from Jats of Sangi Gotra. It is also established from certain historical accounts that some people used to live in huts in the old city. Guriya Ji a Sanwal Brahmin of Kaushal Gotra belonged to Paniar village situated 5 miles north of Gurdaspur. The ancestors of Guriya Ji came from Ayodhaya long time ago and settled in Paniar.
Little is known about the ancient history of Gurdaspur District except a few antiquities like the rock temples at Mukheshwar. From the latter half of the 10th century up to 1919 AD this district was ruled by the Shahi dynasty under Jayapal and Anandpal. Kalanaur in this district was the most important town during the period of 14th to 16th centuries AD. It was twice attacked by Jasrath Khokhar, once in 1422 and again in 1428. In the second attempt, Jasrath Khokhar was defeated by Malik Sikander.
The history of Gurdaspur District also states that this district witnessed the decline and fall of the Mughal supremacy and the rise of the Sikh power in the region. Some of the Sikh Gurus have been closely associated with the district. Guru Nanak, born in 1469 in Lahore district, married Sulkhani in 1485. Guru Har Gobind re-founded Sri Hargobindpur which had been formerly known by the name of Rahila. Banda Bahadur, the disciple of Guru Gobind Singh used this district as a base to raid the country up to Lahore. The history of Gurdaspur District then degenerates into an account of their struggles of the rival Ramgarhia and Kanhaya Misals for supremacy in this part of the Doab, the power of the former was broken in 1808 and of the latter in 1811 by Maharaja Ranjit Singh, who thus assumed rule over the whole district.
During partition of India in 1947 the future of Gurdaspur District could not be decided for many days as this district included a huge Muslim community. However, later on Muslim population of the district migrated to Pakistan and the Hindus and the Sikhs of Sialkot migrated to Gurdaspur. They settled in Gurdaspur District.