Japan began to open its doors to the West in the 1850s, after centuries of remaining closed. In the following decade, foreigners' "concessions" were established in port cities such as Yokohama and Kobe to cope with the new visitors. The Japanese, with their characteristic desire to extend guests every hospitality, quickly discovered that the foreigners had very different tastes in food, music, alcoholic drinks — and sex. Brothels were hastily constructed to satisfy newcomers' lust for Japanese women, but the foreigners looked askance at the same-sex relationships with boys that had been common practice in Japan.

For many centuries, Japan's samurai class nurtured same-sex relationships as an essential part of the lord-retainer bond, and relationships such as these were celebrated in the arts. But in the eyes of the West, a "civilized nation" should regard same-sex relationships as abhorrent. Desperate to be regarded as the equal of Western nations, Japan began to radically reform its sexual attitudes when the nation opened up during the Meiji Era (1868-1912). Not only was male-male sex made illegal for several years in the 1870s, but the language of sex itself was rewritten: The word "nanshoku" (erotic relations between men) was gradually replaced with "doseiai," a translation of the English term "homosexuality," making the idea of same-sex relationships seem foreign.

But it was not just homosexuality that was redefined in the Meiji Era; Japan was in the throes of a social, industrial and sexual revolution. The nation absorbed the theories of Western sexologists and evolutionists, and debates raged about the fate of indentured prostitutes and the social impact of the booming brothel industry.