Shahab-ud-din Muhammad Khurram was born on 5 January 1592 in Lahore, in modern-day Pakistan, and was the third son of Prince Salim (later known as 'Jahangir' upon his accession). His mother was a Rajput princess from Marwar called Princess Jagat Gosaini (her official name in Mughal chronicles was Bilqis Makani). The name "Khurram" (joyous) was chosen for the young prince by his grandfather, Emperor Akbar, with whom the young prince shared a close relationship.
Just prior to Khurram's birth, a soothsayer had reportedly predicted to the childless Empress Ruqaiya Sultan Begum, Akbar's first wife and chief consort, that the still unborn child was destined for imperial greatness. So, when Khurram was born in 1592 and was only six days old, Akbar ordered that the prince be taken away from his mother and handed over to Ruqaiya so that he could grow up under her care, and Akbar could fulfill his wife's wish to raise a Mughal emperor. Ruqaiya assumed the primary responsibility for Khurram's upbringing and he grew up under her care. The two shared a close relationship with each other. Jahangir noted in his memoirs that Ruqaiya had loved his son, Khurram, "a thousand times more than if he had been her own [son]."
Khurram remained with her until he turned almost 14. After Akbar's death in 1605, the young prince was allowed to return to his father's household, and thus, be closer to his biological mother.
As a child, Khurram received a broad education befitting his status as a Mughal prince, which included martial training and exposure to a wide variety of cultural arts, such as poetry and Hindustani classical music, most of which was inculcated, according to court chroniclers, by Akbar and Ruqaiya. In 1605, as Akbar lay on his deathbed, Khurram, who at this point was 13, remained by his bedside and refused to move even after his mother tried to retrieve him. Given the politically uncertain times immediately preceding Akbar's death, Khurram was in a fair amount of physical danger from political opponents of his father, His conduct at this time can be understood as a precursor to the bravery that he would later be known for.
In 1605, his father succeeded to the throne, after crushing a rebellion by Prince Khusrau – Khurram remained distant from court politics and intrigues in the immediate aftermath of that event, which was apparently a conscious decision on Jahangir's part. As the third son, Khurram did not challenge the two major power blocs of the time, his father's and his step-brother's; thus, he enjoyed the benefits of imperial protection and luxury while being allowed to continue with his education and training. This relatively quiet and stable period of his life allowed Khurram to build his own support base in the Mughal court, which would be useful later on in his life.
Due to the long period of tensions between his father and step-brother, Khurram began to drift closer to his father and over time started to be considered the de facto heir-apparent by court chroniclers. This status was given official sanction when Jahangir granted the sarkar of Hissar-Feroza, which had traditionally been the fief of the heir-apparent, to Khurram in 1608. Nur Jahan was an intelligent and beautiful lady with an excellent educational background. She was an active participant in the decisions made by Jahangir. Slowly and gradually, she became the actual power behind the throne, as Jahangir became more indulgent in wine and opium. Coins began to be struck containing her name along with Jahangir's name. Her near and dear relatives acquired important positions in the Mughal court, termed as the Nur Jahan junta by historians. After the death of Jahangir in 1627, Nur Jahan was put under house arrest and led a quiet life.