Nargis is a tawaif based in the Muslim quarter of Lucknow. She dreams of marrying Shahbuddin, the man she loves, but his family's patriarch Hakim Saab strongly opposes their relationship because he finds it unacceptable to welcome a tawaif as a daughter-in-law into his respected family. Dejected, Nargis flees to a nearby qabristan (cemetery) and lives there, giving birth to a daughter before dying. On her deathbed, Nargis writes Shahbuddin a letter asking him to come for his newborn daughter. Nargis' sister Nawabjaan is buying jewellery when she finds a piece that is similar to one owned by Nargis. She asks the jeweller its origin and is led to the cemetery. She finds Nargis' body and her daughter, whom she takes back to her kotha (brothel).
When Nargis' belongings are sold several years later, a man finds Nargis' letter and delivers it to Shahbuddin. Shahbuddin tracks down Nargis' now-adult daughter Sahibjaan and finds her working as tawaif at Nawabjaan's brothel. Nawabjaan, however, does not want him to take Sahibjaan away, and flees with her niece to another town. While travelling by train, a young man enters Sahibjaan's compartment and sees her sleeping. Struck by her beauty, he leaves her a note. After arriving at her destination, Sahibjaan wakes up and finds the note. She reads it and falls in love with the note's author.
A brothel patron named Nawab wishes to own Sahibjaan and takes her to his boat for a night. The boat, however, is attacked by elephants and Sahibjaan is carried away by the fast-flowing river. She is taken to the riverside tent of Salim, a forest ranger. Sahibjaan reads Salim's diary and learns it was him who had left her a note on the train. Sahibjaan feigns amnesia to avoid telling him of her profession.
Before sunset, Nawabjaan finds Sahibjaan and takes her back to the brothel. Sahibjaan keeps thinking about Salim and runs away from the brothel. She runs along the railway line and gets her gharara (clothing) stuck there. Upon seeing an approaching train, Sahibjaan panics, stumbles and faints. The train stops before in time and people come to help her. One of them is Salim, who takes her to his home.
Salim and Sahibjaan plan to elope to live peacefully but her profession makes her doubtful of the plan. When Salim anoints her to marry her, she refuses and decides to return to the brothel. Salim, who is heartbroken, eventually decides to marry someone else at his family's insistence and invites Sahibjaan to perform a mujra at his wedding. During the recital, Nawabjaan recognises Shahbuddin, Salim's paternal uncle, and calls him to witness the irony of the situation: his own daughter dancing and entertaining his family. Shahbuddin's father tries to shoot Nawabjaan to silence her but instead kills Shahbuddin who was trying to protect her. With his dying breath, Shahbuddin asks Salim to marry Sahibjaan. Salim's doli (wedding palanquin) defies convention and arrives at Sahibjaan's brothel, fulfilling Shahbuddin's dying wish.