The mum said: “My daughter was playing outside the house when Balbhadra tried to molest her.”
But the young girl, whose age was not reported, reportedly raised the alarm and passersby rushed to her aid.
They then held Balbhadra before he was accosted by the furious crowd.
The mob shaved his head and began beating him, also thrashing him in revenge.
He was then taken to a nearby police station and handed over, according to local media.
Hardoi Superintendent of Police, Vipin Kumar Mishra, said: “Balbhadra was trying to molest a minor girl, who was later caught and beaten up by the villagers.”
Police continue to investigate the claims.