Drama once was looked on as a kind of erotica with the potential to stir up sensation and encourage the popular audience to pursue happiness regardless of social stability. The function of Buddhism was emphasized in aesthetic theories of drama in 17th century China. This paper explores the role that Buddhism played in the commentary on drama in late imperial China by means of elucidating the related social and cultural contexts of the Xixiang ji (The Story of the Western Wing). It also analyzes the interrelations between religion and drama, and the value system behind Buddhist commentaries on drama of the time. In addition, it investigates the tradition and rationale of the prevailing opinion that looked on the Buddha's life as a wonderful drama, and the religious influence on drama from the Tiantai School of Buddhism. A profound psychological analysis is also found in Jin Shengtan's reading of the Xixiang ji, which was deeply informed by Buddhism. You Tong's reading of the Xixiang ji, written in the style of the eight-legged essay (baguwen), also touches upon many aspects of the Chan teaching in its analysis of the emotional relations between men and women in the story. The paper tries to foreground drama as an important cultural metaphor in Buddhist learning.