The incident came to the fore on July 21. The deceased was working with an insurance company in Haryana's Panipat, they said.
A day before the alleged suicide, the man's colleague in her complaint accused him of sexually harassing her, police said.
The complainant has claimed that on his way home to Dwarka, the man used to drop her at Faridabad. She alleged that he had tried to molest her in his car, they said.
In a purported suicide note, he said he was innocent and that he "said something" to the woman but never touched her inappropriately, they said.
He said he was hurt by the humiliation at his workplace and had decided to end his life, police said, adding the note was handed over by the man's family to the police.
The police are probing the case.