Wealthy, powerful and influential Seth Dharamdas (Prem Nath) leads a financially secure life in a palatial bungalow. He is known to come help people who are beyond any hope of assistance, and this leads to him being known as "Dharmatma". But Seth Dharamdas does have a number of skeletons in his closet and a parallel life as a gangster and a matka king. The only person whom he dislikes and fears is his own son Ranbir (Feroz Khan).
After a heated argument over Dharmatma's matka business, Ranbir leaves home for Afghanistan, where he stays with his uncle and manages his business. One day in a forest while riding a horse, he finds a nomadic man named Jankura (Danny Denzongpa) and a woman named Reshma (Hema Malini) fighting. He defends beautiful Reshma and falls for her. Reshma too falls for him.
Meanwhile, in India, his sister Mona (Farida Jalal) is all set to marry Kundan, son of their father's old friend. She writes to Ranbir to attend her wedding and give them his blessings. Ranbir accepts her invitation and arrives at the venue. The marriage commences and Mona departs after the ceremony. While in the car, she gives her husband a steel ring with "I Love You" inscribed on it.
Ranbir leaves for Afghanistan. He proposes to Reshma, which she accepts. Her foster-father also reluctantly agrees to their marriage. A fortune-teller there predicts that Reshma will bring death to Ranbir which has Reshma worried.
Meanwhile, in India, a business-rival by the name of Anokhelal (Jeevan) proposes a narcotics deal to Dharmatma, which he refuses. His son-in-law tries to force him to accept the scheme but is unsuccessful. Dharmatma recognises the nature of his son-in-law and apologises for his mistake of letting his daughter marry him. He misses Ranbir and orders his assistant Vikram Singh (Iftekhar) to bring Ranbir back from Afghanistan. Vikram Singh agrees but on the way he is kidnapped by Anokhelal's sons Natwar (Sudhir) and Rishi (Ranjeet) and his brother Biradar (Satyen Kappu).
In Afghanistan, Ranbir and Reshma prepare for their marriage. On the day of the wedding, they leave for the temple. While in the temple, Natwar and Rishi plant a bomb in their jeep which will explode once the car is started. After praying, Reshma starts the jeep and it explodes, killing Reshma leaving Ranbir heart-broken.
Natwar and Rishi attack a matka centre of Dharmatma, injuring him and Kundan. They order a nurse (Faryal) to help Kundan in killing Dharmatma. In Afghanistan, Ranbir gets the news of attack on his father and returns to India. Kundan kills Dharmatma assisted by the nurse but loses his ring given to him by his wife. Ranbir arrives and finds that his father is dead. He promises to his father that he will find out his murderer and punish him. Some days later, Ranbir with Anu (Rekha), a childhood friend who secretly loves him, goes out for a drive where he is attacked by goons sent by Anokhelal. The doctor who operated on his father gives him the ring which he found in Dharmatma's hand and tells him that his father died from suffocation. Ranbir suspects an hospital employee to be a part of the conspiracy and asks the doctor about the nurse on duty that night. He visits her house only to find her killed by Natwar and Rishi. He tries the ring on her hand but it doesn't fit.
Kundan arrives and lies to him that Vikram Singh is the killer and asks Ranbir to kill Vikram Singh.
Meanwhile, at Anokhelal's place, they raise a toast for dead Dharmatma. Ranbir arrives there. Kundan, Natwar and Rishi hide upstairs and position a sniper to kill Ranbir. Downstairs, Ranbir accepts the drug deal which his father declined and provides them with ₹ 5 million but on a condition that they will give him Vikram Singh, dead or alive, to which Anokhelal agrees. Anokhelal signals Natwar to stop Kundan from firing at Ranbir, which makes Kundan very angry. He returns home, drunk with a prostitute which makes Mona furious. Drunk Kundan gets angry and beats Mona. Ranbir comes to know about this and gets furious. He arrives at their place and beats Kundan but Mona stops him pleading him not to make her a widow. Kidnapped Vikram Singh is killed by Anokhelal.
Then they take his dead body in a coffin and meet Ranbir in a church burying ground. Ranbir tries the ring on Vikram Singh but it doesn't fit. Then Anokhelal laughs at him and confessing that he got his father killed. His hidden goons try to kill Ranbir but cops present already saved him, killing Anokhelal and his brother Biradar but Ranbir is injured during that. He thanks cops for saving his life and departs.
At his place, while bandaging his wounds, Anu asks him to leave this place and travel to a safer place to which he disagrees. After which Mona arrives, tying rakhi to Ranbir's wrist. She sees the steel ring in Ranbir's hands and saying that she has given one to Kundan but he has lost it. Ranbir realises that Kundan is the main culprit in the death of his father. He wants to kill him but is in a fix because he does not want to make his sister a widow.
Mona and Kundan return home where they find Natwar and Rishi already present. Kundan signals Mona to go upstairs. Natwar and Rishi blackmail Kundan that they will expose that he was the main culprit behind his father-in-law's death. They demand him to find a path for Ranbir's death. Mona hears this conversation and informs about this to Ranbir. Kundan sees her doing all this.
Ranbir and Shakti Singh (Dara Singh), a top henchman of his father, arrive at their place and find Mona dead. A mourning Ranbir receives a call from Kundan asking Ranbir to meet him at his hideout in Madh Island. Meanwhile, he plans to kill him and Shakti Singh.
Ranbir accepts and arrives, only to find a bunch of goons with machine guns there to kill him and Shakti Singh.
Kundan lands in helicopter a hilly place with a small cottage where Natwar and Rishi are present. They ask him about their safehouse to which he says that a ship in the sea waiting for their arrival and then he asks them about the narcotics. They reply that it is in cottage. He asks its worth to which they reply that it is full 5 million. Then he kills them and takes the carton of drugs from cottage back to the helicopter where he finds Ranbir. He is astonished to see him alive and confesses him about the plan according to which he killed his father. Then he is forced to commit suicide by Ranbir by jumping off from the hill.
After that, Ranbir closes all Matka rackets across the world which was led by his father and hands over all the black money earned by his father to the police. He leaves with his mother and Anu, now his wife, to Afghanistan to continue his old work there.Prem Nath as Dharamdas 'Dharmatma'
Feroz Khan as Ranbir
Hema Malini as Reshma
Rekha as Anu
Danny Denzongpa as Jankura
Farida Jalal as Mona
Ranjeet as Rishi
Sudhir as Natwar
Imtiaz Khan as Kundan
Madan Puri as Ranbir's Uncle
Jeevan as Anokhelal
Satyen Kappu as Biradar
Helen as Dancer
Iftekhar as Vikram Singh
Faryal as nurse
Sulochana Latkar as Shanti
Jagdish Raj as Dr. Jagdish
Krishnakant as Governor
Habib as Baron
Major Anand as Police Commissioner
Brahm Bhardwaj as Dr. Roy
Nadira as Gypsy Woman
Alka as Rani
Nana Palsikar as Purshottam
Nazir Hussain as Zaheera's Dad
Krishan Dhawan as Kishanlal (Anu's Dad)
Himmat Sinh Chauhan
Dara Singh as Shakti Singh
Kalyanji Anandji had composed all the songs of Dharmatma. This was their second collaboration with Feroz Khan after Apradh. Indeevar penned the lyrics. The music of the film had a fusion of Afghani Music and Western Music. The songs of the film became superhits.