Warning: Wikipedia contains spoilers

M. Butterfly is a 1988 play by David Henry Hwang, which deals with themes about cultural stereotypes of East vs West, and which is loosely based on the real life relationship between Bernard Boursicot and Shi Pei Pu. The play was inspired by the opera Madame Butterfly.

The main character (Rene Gallimard) is a civil servant attached to the French embassy in China. He falls in love with an effeminate male opera singer (Song Liling), deluding himself that Liling is a woman. The singer spies on Galliard for the Chinese government, but, unwilling to risk losing his love, turns out to be a fairly ineffective spy. The Frenchman slowly goes insane as he tries to convince himself he is actually in a relationship with a woman, in the face of unavoidable evidence to the contrary. Liling is so happy to be treated as an actual woman, and not as a gay transvestite, that s/he goes to great lengths to reinforce Galliard's fantasy world. Eventually the Chinese spy is sentenced to a forced labor camp for sexual deviancy and Galliard commits suicide rather than face reality.

The original cast featured John Lithgow as Gallimard and B. D. Wong as Song Liling. David Dukes, Tony Randall, and John Rubenstein also played Gallimard during the original run.

The play was made into a 1993 movie by David Cronenberg.