Emperor Akbar (Prithviraj Kapoor), who does not have a male heir, undertakes a pilgrimage to a shrine to pray that his wife Jodhabai (Durga Khote) will give birth to a son. Later, a maid brings the emperor the news of his son's birth. Overjoyed at his prayers being answered, Akbar gives the maid his ring and promises to grant her any wish she desires.
The son, Prince Salim, grows up to be spoiled, flippant, and self-indulgent. His father sends him off to war to teach him courage and discipline. After 14 years, Salim returns as a distinguished soldier (Dilip Kumar). He falls in love with court-dancer Nandira, whom the emperor has renamed Anarkali (Madhubala), meaning pomegranate blossom. The relationship is discovered by the jealous Bahar (Nigar Sultana), a dancer of a higher rank, who attempts to force the prince to love her so that she may ascend to the status of Queen. Unsuccessful in winning Salim's heart, she exposes the forbidden love between him and Anarkali. Salim pleads for Anarkali's hand, but his father objects and throws Anarkali into prison. Despite this, Anarkali refuses to reject Salim.
Salim rebels and amasses his own army to confront Akbar. Salim is defeated in battle and is sentenced to death by his father, but is told that the sentence will be revoked if Anarkali, now in hiding, is handed over to die in his place. Akbar's subjects plead to spare his son, and Anarkali comes out of hiding to save the prince's life. She is condemned to death by being entombed alive. Before her sentence is carried out, she pleads to have a few hours with Salim as his make-believe wife. She is granted the wish, as she agrees to drug him afterwards so that he cannot interfere with her entombment.
As she is being walled up, Akbar is reminded that he still owes a favour to Anarkali's mother, since she was the maid who carried the message of Salim's birth to him. Anarkali's mother begs for her daughter's life. The emperor relents, and arranges for Anarkali's secret escape with her mother into exile. He stipulates, though, that they are to live in total obscurity, and that Salim is never to know that Anarkali still lives.