Confucianism, Buddhism and Taoism are the main ideas of ancient Chinese society. They have a great influence on ancient Chinese intellectuals. There have been many famous literary works that are compatible with Confucianism, Buddhism and Taoism. Chinese drama has a long history and rich content. It can be divided into ornamental drama and ceremonial drama. The performance venue of ceremonial drama is located in the countryside. The participating groups are all farmers and are true vulgar literature. Taking an ancient folk ritual drama from the south of Shanxi province as the object of investigation, this paper has collected and collated 50 kinds of precious folk scripts, the oldest of which is 235 years old. Analyzing the Confucian, Buddhist and Taoist thoughts in the script, we can find that these thoughts are more clearly presented in the subject matter, plot setting, drama language and character setting. Confucianism is mainly manifested in Script lines and characters. The script has shaped the image of many wise kings, loyal ministers, faithful wife,and filial sons. A large number of Taoist terms and characters are used in the plays. In terms of characters and plots, Taoist thoughts are also vividly reflected. Buddhist thoughts are more reflected in karma and reincarnation in the folk script. They show that the general public uses religion to comfort the soul, try to endure the suffering of the world, and do more good deeds in exchange for happiness in the afterlife. By comparing with ornamental drama, we can find that the Taoist drama works created by intellectuals emphasize different ideological tendencies of preaching, seclusion, and expressing life as a dream. The Taoist thoughts in the folk script are more peculiar to fairy spells, and the Taoist characters have extensive divination and good fortune, forecasting the future. It shows the tendency of the people to pay more attention to practicality. Whether it is the literary creation of The Exhortation of Goodness or the folk script The White Pelican Open Road, it shows the tendency of Confucianism, Buddhism, and Taoism to coexist, infiltrate, and merge with each other. It proves that the basic ideological pattern of the ancient Chinese society is dominated by Confucianism, supplemented by Buddhism and Taoism, and the unity of the three religions.