…and a man must not wear a woman’s garment… (Deuteronomy 22:5)
The previous mitzvah prohibits a woman from wearing a man’s clothes; this mitzvah addresses the ban against a man wearing a woman’s clothing. The reason is the same for both mitzvos: to serve as a deterrent to immorality, with men passing as women and women passing as men.
This prohibition includes not only wearing women’s clothes but also beauty practices that are associated with women such as tweezing one’s eyebrows or dying one’s hair. (See Talmud Shabbos 94b.) Targum Onkelos reflects this halachic reality in his translation by rendering our verse “a man shall not adorn himself in the manner of women.”
This mitzvah applies in all times and places. It is discussed in the Talmud in the tractates of Nazir (59a) and Makkos (20b). It is codified in the Mishneh Torah in the twelfth chapter of Hilchos Avodas Kochavim. This mitzvah is #40 of the 365 negative mitzvos in the Rambam’s Sefer HaMitzvos and #179 of the 194 negative mitzvos that can be observed today as listed in the Sefer HaMitzvos HaKatzar of the Chofetz Chaim.