The Kabuki form dates from the early 17th century, when a female dancer named Okuni (who had been an attendant at the Grand Shrine of Izumo), achieved popularity with parodies of Buddhist prayers. She assembled around her a troupe of wandering female performers who danced and acted. Okuni’s Kabuki was the first dramatic entertainment of any importance that was designed for the tastes of the common people in Japan. The sensuous character of the dances (and the prostitution of the actors) proved to be too disruptive for the government, which in 1629 banned women from performing. Young boys dressed as women then performed the programs, but this type of Kabuki was suppressed in 1652, again because of concern for morals. Finally, older men took over the roles, and it is this form of all-male entertainment that has endured to the present day.
https://www.britannica.com/art/Kabuki