The woman, an undergraduate student of commerce, used to chat with the Muslim man - who went to the same college - regularly on Facebook. In one such chat, she had written, "I like Muslims", the police said.
The right-wing group, the police said, had initially given her warnings on Facebook.
On Saturday, around 6 pm, the men barged into the woman's house. They told her parents that the Muslim man's friendship with their daughter was a case of "love jihad" - a term used by right-wing groups accusing Muslim men of drawing Hindu women into relationships and converting them. They also insulted the woman and her parents, and demanded that they call off the friendship, the police said.
The same evening, the woman hanged herself.
Reports of moral policing and violence allegedly on basis of community are becoming frequent in Karnataka, where assembly elections will be held later this year.
Earlier this month, the police in Karnataka's coastal district of Dakshin Kannada near Puutur were accused of beating up a young man and harassing his woman friend in an alleged case of moral policing, prompting the state's Home Minister to order an investigation. In a video message that was widely shared online, the young woman said they were targeted because they belonged to different religions.
Last week, a Muslim man was attacked in retaliation against the attack on a BJP supporter, the police said. Four people were arrested for the attack on Basheer Ahmed, a food-stall owner, who died on Sunday morning.
Follow NDTV for latest election news and live coverage of assembly elections 2019 in Maharashtra and Haryana.
Subscribe to our YouTube channel, like us on Facebook or follow us on Twitter and Instagram for latest news and live news updates.