It is narrated from Sayyiduna Ibn Abbas (may Allah be pleased with them both) that the Noble Prophet (peace and blessings be upon him) cursed effeminate men and women who imitate the ways of men, and said: "Expel these effeminate men from your houses." Sayyiduna Ibn Abbas (may Allah be pleased with them both) said: The Messenger of Allah (peace and blessings be upon him) expelled such-and-such a eunuch, and Sayyiduna Umar (may Allah be pleased with him) expelled such-and-such a man or woman. Imam Darimi (may Allah have mercy on him) said: This doubt occurred to me.
Hadith Referenceسنن دارمي / من كتاب الاستئذان / 2685
Hadith Takhrijاس حدیث کی سند صحیح ہے۔ دیکھئے: [بخاري 5885، 5886] ، [ترمذي 2785] ، [أبويعلی 2433] ، [شرح السنة 3207]
Brief Explanation
(Commentary on Hadith 2684) «”مخنّث“» is the intermediate creation between man and woman, who are neither men nor women. In common parlance, they are called "hijra" (eunuchs/intersex). For men to adopt feminine behaviors—such as in hair, clothing, and mannerisms—and for women to similarly imitate men, is a highly reprehensible act. Such people are very brazen, shameless, and lacking in honor; therefore, the command has been given to expel them from homes. Nowadays, as a matter of fashion, boys and girls in schools and colleges engage in such behaviors. Islamic law prohibits these reprehensible acts. Whatever gender Allah Ta'ala has created a person as, they should remain as such. And Allah knows best.