Sunan Ibn Majah, Book 20, Hadith 36 (Ibn Majah 2570)

It was narrated from Ibn Abbas that the Prophet (ﷺ) said:

“If one man says another: 'O effeminate one!' give him twenty lashes. And if one man says to another: 'O homosexual!' give him twenty twenty lashes.”