The bass player for a Mexican rock band appeared to have killed himself a day after he was accused of sexually harassing a young woman when she was 13.

Police said Armando Vega-Gil was found dead at his home after an anonymous woman posted a complaint online claiming he had sexually harassed her when she was 13 and Vega-Gil was 50.

Vega-Gil denied the accusation but said that "a terrible end is better than an endless terror." He also published a letter saying he would kill himself "to leave the way clear" for his son.

"The accusation... is anonymous, and the person who published it on social media has every right to do it that way, but this places in doubt my entire career," Vega-Gil wrote, noting "my death is not an admission of guilt, rather it is a radical declaration of innocence. I just want leave the way clear so my son can make his own way in the future."

The letter immediately unleashed criticism of Mexico's newly energised "#MeToo" movement. The group's Twitter account was taken down soon after news of the suicide broke.