Kanti Sharan Mudgal (Pankaj Tripathi), a staunch devotee of Lord Shiva, owns a shop outside the city's prominent Mahakaal temple. One day, he is called to the hospital and told that his son Vivek (Aarush Varma) was up all night masturbating continuously until he fainted, and consumed multiple Viagra tablets. Vivek's friend explains that an insecure Vivek was bullied about the size of his penis and was told that masturbating will increase it. The biology teacher at school refused to answer Vivek's questions, which led him to shady people and drugs and eventually to the hospital.
Kanti is told by the school chairman (Arun Govil) that there's a video going around of Vivek masturbating in the school washroom. As this is affecting the school's image, Vivek is rusticated on grounds of obscenity. Kanti's friend, Pandey Ji (Govind Namdev), a rich priest at the temple, advises him to leave town as the situation is tarnishing their religious image.
The video reaches Kanti's wife and daughter and their entire neighborhood. They start getting shamed by society. Devastated, Kanti prays to Lord Shiva for help, when a divine power shines in the Temple and a Messenger (Akshay Kumar) sent by Lord Shiva arrives.
After a police complaint against Vivek for trying to murder his bully, The Messenger meets Vivek and Kanti at the police station, saying he's there to lodge a complaint of his missing bag, where he comforts Vivek.
Vivek tries to commit suicide twice but is saved by the Messenger. He meets Kanti as they're about to leave town, and tells him that his son did nothing wrong. He uses the example of a breastfeeding mother to explain that not everything done in privacy is wrong or obscene. It is the school's fault for not educating him properly and Kanti's fault for not guiding him properly. He advises Kanti to file a case against the school and the medical practitioners.
Kanti files a case against the school, the chemists, the doctor, and himself. When opposed with the fact that he is just promoting vulgarity by defending his son's act, he holds the point in court that the Sanatan Dharma and Indian culture was always inclusive of conversations on sex. He also shows the intimate human art carvings of Ellora, Ajanta, and Khajuraho temples, and quotes multiple books that he found from a random bag to get his case accepted. Pandey Ji asks Kanti to leave his given house and shop as this case will tarnish their religious image.
The opposition lawyer, Kamini Maheshwari (Yami Gautam) says Kanti is doing all this to cover up his son's vulgar act. Kanti argues that if the school had included sex education in their courses, his son wouldn't have been so misinformed. The Messenger often visits to give Kanti indirect advice on how to continue the case.
Kamini calls a sex worker to court, whose son studies in the same school, to prove a point that the school is very noble. Kanti asks the prostitute if she ever enjoys her work, to which she says that those ignorant men don't know anything about a woman's body and how to treat it with respect. Kanti says that if the schools taught sex education to young boys, they'd know how to respect a woman's body.
He then says that even her own son shouldn't become like the ignorant men who come to her for pleasure, to which the entire courtroom is left speechless. He bows down to her calling her a brave mother and teacher.
As the case continues, Kanti points out issues regarding pornography, rape, drugs, and the importance of sex education. He's offered ten million (one crore) by the school chairman for taking his case back. Kanti falls into the emotional trap of his son's future and signs the contract. He gets into an accident and apparently dies. He is visited by the Messenger in the hospital, who criticises his decision of losing faith, and finally reveals himself to be a divine manifestation sent by Lord Shiva. He shows Kanti that his efforts have come to light as Pandey Ji's granddaughter reveals to her family the sexual abuse she's been going through, thanks to Kanti's case being shown on TV. Kanti realises his mistake and is reincarnated and taken to court.
At the hearing, Vivek arrives for the first time and proves through his research that colonisers ruined India's education system, which was actually inclusive of sex education in the ancient times. Teens from the crowd come forward saying they masturbate too and it's not a sin, including the Judge's own son. Kanti wins the case as the education board is ordered to make sex education compulsory and payment be given to Kanti, and Vivek be taken back into the school.
Kanti introduces his family to the Messenger as "the doctor who treated him" and offers all the money in his hands instead of the temple. The Messenger then reveals that the lost bag was his, and asks Vivek to keep it with him, with the cultural and religious books inside it.
He then says that he has another patient to attend to, and drives away, leaving a happy Kanti with praying hands behind.