His father, Guru Har Rai ji supported the moderate Sufi influenced Dara Shikoh instead of conservative Sunni influenced Aurangzeb as the two brothers entered into a war of succession to the Mughal Empire throne. After Aurangzeb won the succession war in 1658, he summoned Guru Har Rai in 1660 to explain his support for the executed Dara Shikoh. Guru Har Rai sent his elder son Ram Rai to represent him. Aurangzeb kept the 13 year old Ram Rai as hostage, questioned Ram Rai about a verse in the Adi Granth – the holy text of Sikhs. Aurangzeb claimed that it disparaged the Muslims. Ram Rai changed the verse to appease Aurangzeb instead of standing by the Sikh scripture, an act for which Guru Har Rai excommunicated his elder son, and nominated the younger Har Krishan to succeed as the next Guru of Sikhism.
Earlier it was believed that Guru Har Krishan Sahib was born in Keeratpur (Sivalik Hills) in the North West of the Indian subcontinent to Mata Sulakhni and Guru Har Rai ji. But, as per Dabistan-i-Mazahib (written in 1660), Guru Har Rai spent 13 years (1644 to 1657) at Thapalpur (then Nahan State); hence Guru Harkrishan was born in 1652 at Thapalpur, old Nahan State, now (Lohgarh Zone), Haryana.
Aurangzeb meanwhile rewarded Ram Rai, patronizing him with land grants in Dehra Dun region of the Himalayas. A few years after Guru Har Krishan assumed the role of Sikh leader, Aurangzeb summoned the young Guru to his court, with an apparent plan to replace him with his elder brother Ram Rai as the Sikh Guru. However, Guru Harkrishan Rai contracted smallpox when he arrived in Delhi and his meeting with Aurangzeb was cancelled. On his deathbed, Guru Har Krishan said, "Baba Bakale", and died in 1664. The devout Sikhs interpreted those words to mean that the next Guru is to be found in Bakala village, which they identified as Guru Tegh Bahadur, the ninth Guru of Sikhism.
Authentic literature with more details about Guru Har Krishan's life and times are scarce and not well recorded. Some of biographies about Guru Har Krishan, particularly about who his mother was, were written in the 18th century such as by Kesar Singh Chhibber, as well as in the 19th century, and these are highly inconsistent.