Mughal-e-Azam film re-tells a popular Indian tale, which was previously filmed as Loves of a Mughal Prince (1928) and Anarkali (1953). It is loosely based on an episode in the life of the Mughal prince Salim, who went on to become the Emperor Jahangir. In the movie, the great conqueror Akbar (played by Prithviraj Kapoor) and his Rajput wife, Mariam-uz-Zamani (played by Durga Khote) have a son - the weak and pleasure-loving Salim - played by Dilip Kumar.
Salim falls in love with Anarkali (Madhubala), a court-dancer. He wants to marry her, but his father objects and throws Anarkali into prison. Despite imprisonment, Anarkali refuses to reject Salim. Salim rebels against his father, is defeated in battle, and is sentenced to death. Anarkali pleads for his life in exchange for her own, and is condemned to be walled up alive.
However, it is revealed that Akbar owed a favor to Anarkali's mother, since she informed him of the birth of his son. Anarkali's mother takes advantage of this, and begs for her daughter's life. The emperor relents, and arranges for Anarkali's secret escape into exile. Unfortunately, it is still announced that Anarkali was killed, and Salim is heartbroken.
Most tales of Salim and Anarkali end with the death of the latter, even though the movie version is slightly more optimistic. However, Salim is still left to believe that Anarkali is dead and the lovers are separated for the rest of their lives.