During the Qing dynasty (1644–1911), the Qianlong emperor, who reigned from 1736–1796, was an admirer of theatre performance. When his eightieth birthday was celebrated in 1790, performing companies from nearby provinces gathered in the capital city of Beijing to participate in the festivities and pay homage to the emperor.
The best of the troupes from Anhui province enjoyed great success in the capital, so other troupes performing in the Anhui style came to Beijing as well, where they interacted with performers from other regions, particularly Hubei and Shanxi. The combination of their talents and regional styles, along with the traditions of Kunqu, the aristocratic Ming theatre, formed the basis for a new theatre form, that of Beijing.
The emerging form was called pihuang, a combination of the names for the two principal modes of music incorporated into the new style, xipi, a modal system from Hubei province, and erhuang, a modal system from Anhui province.
As the form developed and spread to other cities, a new name, Jingxi (capital theatre), came into use in the latter half of the nineteenth century. The strength of the new form came from absorbing the best aspects of existing forms and the melding of all that had come before. Hence, in addition to being the celebration of the emperor's birthday, 1790 is considered by some as the birth of the theatrical form now called Jingju.