Plot
In 1924 Peking, a young boy by the name of Douzi is abandoned by his prostitute mother to a Peking opera troupe supervised by Master Guan, who like many other opera troupe leaders, would take in orphaned children as apprentices. There, Douzi is mocked by the other children for his mother's origin, but nonetheless is befriended by another boy about his age, Shitou, a boy with a talent for breaking stones with his head.
As teenagers, Douzi trains to play dan (female heroine roles), while Shitou learns jing (male hero roles). When practicing the play Dreaming of the World Outside the Nunnery, Douzi repeatedly misspeaks the line "I am by nature a girl, not a boy" as "I am by nature a boy, not a girl," for which he receives severe physical punishment. Douzi and another student, Laizi, attempt to run away; Laizi buys candied hawthorns using Douzi's few coins, but Douzi decides to pursue acting seriously after being moved by an opera performance. Upon returning, they find the whole troupe being punished for their desertion, and Douzi steps in and is beaten in Shitou's place. As a result, Laizi eats the hawthorns and later hangs himself.
Na Kun, an agent who provides funding for opera plays, comes to the troupe to seek potential actors. When Douzi repeats the same mistake in front of the agent, Shitou commands him to start over. Douzi finally delivers the entire monologue successfully and secures Na Kun's patronage. The troupe is invited to perform for eunuch Zhang. Shitou and Douzi are brought to Zhang's house where they find a finely crafted sword, which Shitou promises to one day gift to Douzi, as the hero would do for his concubine. Zhang asks to meet Douzi in his room and sexually assaults him. Shitou implicitly knows what happened, although Douzi does not speak of the assault. On their way home, Douzi rescues an abandoned baby, who later comes under Master Guan's training.
Years later, Douzi and Shitou have become Peking opera stars, taking the names Cheng Dieyi and Duan Xiaolou, respectively. Their signature performance is the play Farewell My Concubine, where Cheng Dieyi plays Consort Yu and Duan Xiaolou plays Xiang Yu; before every play, Dieyi would finish the stage makeup for Xiaolou as a small act of love. Their fame attracts the attention of the high-ranking Yuan Shiqing when he attends their performances. Yuan has come to possess the sword from Zhang's house, which he gives to Dieyi as a gift. Though pursued by Yuan, Dieyi is secretly in love with Xiaolou. Xiaolou later meets Juxian, a headstrong prostitute who buys her freedom and seeks an ordinary life with him. After Xiaolou marries her, Dieyi feels betrayed, and the relationship among Dieyi, Xiaolou, and Juxian becomes the central emotional conflict in the film. When Master Guan dies, the abandoned baby, now Xiao Si, comes under Dieyi's training to continue learning dan roles.
During the Second Sino-Japanese War, Xiaolou is arrested after confronting Japanese soldiers, and Juxian asks Dieyi to help secure his release. Dieyi performs for the Japanese in exchange for Xiaolou's freedom, but after Japan's surrender, the Kuomintang authorities charge him with treason. Xiaolou and Juxian seek Yuan's help to save him, but Juxian miscarries during the crisis. Dieyi is eventually released, yet the incident deepens the emotional distance between him, Xiaolou, and Juxian. As his personal and professional life declines, Dieyi becomes addicted to opium.
When the communist forces win the civil war, Yuan is sentenced to death, and Xiao Si becomes an avid follower of the new government, questioning his teacher about his position regarding the new government approved plays and after receiving a negative answer, accuses him of being a capitalist. Dieyi's addiction negatively affects his performances and renders him unable to sing, but he ultimately quits opium with the help of Xiaolou and Juxian. Xiao Si nurtures resentment against Dieyi because of his rigorous teachings and usurps his role in Farewell My Concubine in the middle of a performance. Xiaolou initially refuses to perform with Xiao Si, but the latter implicitly threatens him with the politics of not performing for the masses, and Xiaolou continues the performance. Devastated by the betrayal, Dieyi secludes himself and refuses to reconcile with Xiaolou.
As the Cultural Revolution continues, the Peking Opera is prohibited and replaced with Maoist plays. The entire opera troupe, accused by Xiao Si and Na Kun, is forced into a struggle session by Red Guards. The opera troupe is forced to dress up and is paraded around town while being ridiculed by their captors as well as bystanders. Xiaolou's mighty and meaningful stage makeup becomes smudged after being beaten up by the Red Guards: Dieyi, in full costume of Consort Yu, calmly picks up the brush and finishes the stage makeup for a humiliated and weakened Xiaolou. Then, under pressure, Xiaolou accuses Dieyi of counterrevolutionary acts. After Xiaolou implies Dieyi is homosexual, Dieyi tells the guards that Juxian was a prostitute. To protect himself from further persecution, Xiaolou swears that he does not love Juxian and will "make a clean break" with her.
Although humiliated, neither Xiaolou or Dieyi are convicted, but must continue to reenact the play for the new government. Juxian is heartbroken and returns the sword to Dieyi before committing suicide. Xiao Si is caught by the Red Guards singing Consort Yu's lines while admiring the lavish stage jewelry he took from Dieyi.
In 1977, Dieyi and Xiaolou reunite, seeming to have mended their relationship. They once again practice Farewell My Concubine. During a break, Xiaolou begins reciting the line "I am by nature a boy," to which Dieyi makes the same mistake of finishing with "I am not a girl." As their performance reaches its climax, Dieyi takes Xiaolou's sword and kills himself, completing the role of Consort Yu and merging his own fate with the opera's tragic ending. Xiaolou screams Dieyi's name, then softly calls out "Douzi..."