Aneesh, a native of Karara at Attappady in Palakkad, was found hanging outside his house on Thursday evening.
He and his girl friend were victims of moral policing on Valentine 's Day when they went to Azheekkal Beach.
According to their complaint, the men allegedly threatened and abused them and had videographed them and circulated it on social media.
On Valentine Day, Aneesh's lady friend had walked to a secluded area of a beach to relieve herself since there was no toilet nearby.
In the suicide note, he has blamed the vigilantes for his death.
The man was attacked too when he tried to rescue her. The accused are said to have videotaped the couple, and even asked the woman obscene questions. The duo then complained to the police, after which the men were arrested.
Unfortunately, the young man was highly upset after the incident and hardly spoke to anyone, his friend claimed.
Earlier, Kerala Chief Minister P Vijayan condemned the incident and ordered the state police chief to take strict action on incidents of moral policing incidents.
Police say Aneesh had not stepped out or interacted with others much after he returned home after the moral policing incident. "Such criminal activities will not be tolerated in Kerala", Mr Vijayan had warned.