The movie starts with Raju (Dev Anand) being released from jail. Raju was a freelance guide, who earned his living by taking tourists to historic sites. One day, a wealthy and aging archaeologist, Marco (Kishore Sahu) comes to the city with his young wife Rosie (Waheeda Rehman), the daughter of a courtesan. Marco wants to do some research on the caves outside the city and hires Raju as his guide.
While Marco devotes himself to the discovery of the cave, Raju takes Rosie on a tour and appreciates her dancing ability and innocence. He learns about Rosie's background as a daughter of a virgin courtesan and how Rosie has achieved respectability as the wife of Marco but at a terrible cost. She had to give up her passion of dancing since it was unacceptable to Marco. Meanwhile, Rosie tries to commit suicide by consuming poison. Marco, upon learning of the incident, returns from the caves to see Rosie and is furious with Rosie after seeing her alive. He tells her that her act of committing suicide was a drama, otherwise she would have consumed more sleeping pills so that she could really have died. Upon returning to the caves which were discovered, Rosie learns that Marco is spending time and enjoying the company of a native tribal girl. She is enraged at Marco and both indulge in a serious heated discussion, which concludes with Rosie leaving the caves, and she once again wants to end her life.
Raju calms her down by saying that committing suicide is a sin, and that she should live to pursue her dream. She finally says good-bye to the relation of being the wife of Marco. Now she needs support and a home. Raju gives her shelter. Rosie is considered a prostitute by Raju's community (as classical dancing traditionally was prostitutes' work at royal courts), which leads to many problems, including his mother and her brother insisting that Rosie be kicked out. Raju refuses and his mother leaves him. His friend and driver also falls out with him over Rosie. Raju loses his business and the entire town turns against him. Undeterred by these setbacks, Raju helps Rosie embark on a singing and dancing career and Rosie becomes a star. As she rises as a star, Raju becomes dissolute - gambling and drinking. Marco comes back on the scene. Trying to win Rosie back, he brings flowers and has his agent ask Rosie to release some jewelry which is in a safe deposit box. Raju, a bit jealous, does not want Marco to have any contact with Rosie and forges Rosie's name on the release of the jewels. Meanwhile, Rosie and Raju drift apart due to Rosie's incomprehensible behavior when she tortures Raju by not obliging him a caring hug even and asks him to leave her room else she says she will have to go out. Before this, they also had a discussion about how a man should live when Rosie remembers Marco and tells Raju that Marco was probably correct when he used to say that a man should not live on a woman's earnings.
Raju retorts by saying that she is under a misunderstanding that she has become a star on her own and it was only because of Raju's efforts that she became famous. Later, Rosie learns of the forgery release. Raju is convicted of forgery, resulting in a two-year sentence. Rosie does not understand why Raju indulged in forgery, when he could have easily asked her for money. It was not money, it was the loving fascination for Rosie which urged Raju not to reveal Marco's visit to Rosie so that she doesn't remember him again and to eliminate the probability of Rosie and Marco's togetherness, if at all, there was any little chance. On the day of his release, his mother and Rosie come to pick him up but they are told that he was released six months ago because of his good behavior.
Meanwhile, upon his release Raju wanders alone. Despair, poverty, rags, hunger, and loneliness engulf him until he finds a wandering group of sadhus (holy men) with whom he spends a night at a derelict temple in a small town.Raju impresses the woman with the logic in taking a husband and she submits, which convinces Bhola that Raju is a swami (holy man). Impressed by this, Bhola spreads the news through the village. Raju is taken as a holy man by the village. Raju assumes the role of village holy man (Swami Ji) and engages in skirmishes with the local pundits.And drama started here. Due to drought Raju was forced to fast for 12 days so that it rains. Meanwhile, his mother, friend and Rosie unite with him and patch things up. In the end it rains but Raju dies.