Chiyang Daoren, Eastern Taoism
The Shanghai City God Temple stands on Middle Fangbang Road in Huangpu District, Shanghai, in the middle of the Old City, near the Yu Garden.

The Shanghai City God Temple is a Taoist temple with a long history and deep cultural roots. It is the most important temple of the Zhengyi school of Taoism in Shanghai and a famous cultural and tourist attraction of the city. It is therefore not only a symbol of Taoist culture but also an important part of Shanghai's urban culture, and at the same time an important representative of the City God Temple as a form of Taoist architecture and culture.
1. Historical Origins of the Shanghai City God Temple
The history of the Shanghai City God Temple can be traced back to the Song and Yuan dynasties. It is said that in the Jiading era of the Southern Song, the Shanghai area suffered a severe drought. The people prayed to the City God for rain, and their prayers were indeed answered. Afterward, to thank the City God for his protection, the local people built a City God Temple on the present site. After expansion and repairs through the Yuan, Ming, and Qing dynasties, it reached the scale we see today.

Legend has it that the Shanghai City God Temple was built by Sun Hao, emperor of the state of Wu in the Three Kingdoms period.
In the Yongle era of the Ming dynasty (1403–1424), Zhang Shouyue, then magistrate of Shanghai, converted the former Jinshan Shrine into a City God Temple and changed its worship to Qin Yubo, the imperially appointed City God of Shanghai. In the Tianshun era of the Ming (1457–1464), the Shanghai magistrate Li Wen rebuilt the temple and erected a pavilion in front of the hall. In the fourteenth year of Jiajing (1535) the mountain gate was rebuilt and a memorial archway erected. In the thirtieth year of Wanli (1602) the magistrate Liu Yilu rebuilt it. In the thirty-fourth year of Wanli (1606) it burned down, and soon afterward the magistrate Li Jizhou rebuilt it again.
In the twenty-second year of Kangxi in the Qing dynasty (1683), the magistrate Shi Cai donated his salary and led a restoration, building two drum pavilions. In the forty-eighth year of Kangxi (1709), local gentry built the East Garden to the east of the temple, digging ponds, building pavilions, piling up rockeries, and planting flowers, expanding the temple grounds by more than 10 mu. In the thirteenth year of Yongzheng (1735) the abbot of the time raised funds to repair the halls. In the thirteenth year of Qianlong (1748) the sleeping palace burned down and the magistrate of the time, Wang Cu, rebuilt it. In the middle of the Qianlong reign, the neighboring Yu Garden had fallen into ruin; the temple bought it cheaply as its West Garden, and the temple grounds grew to more than 36 mu. In the fifty-ninth year of Qianlong (1794), Ge Wenying of the Taoist Registry raised funds to build the rear building. In the third year of Jiaqing (1798) the main hall was rebuilt again, and the Taoist Registry and the Twenty-Four Departments were set up. In the sixteenth year of Daoguang (1836) the two side corridors and the opera stage burned down and were later rebuilt with donations. In the twenty-second year of Daoguang (1842), when British troops occupied the city of Shanghai, they used the City God Temple as their quarters. In the third year of Xianfeng (1853) the Small Swords Society occupied Shanghai and stayed in the temple for more than a year. In the tenth year of Xianfeng (1860) the temple became barracks for British and French troops. After several military occupations, the temple was stripped bare and changed beyond recognition. In the Tongzhi era of the Qing (1862–1874), the magistrate Wang Zonglian and the circuit intendant Ying Baoshi in turn led donations for a major restoration lasting ten months, after which the temple looked brand new and was once again magnificent. In the nineteenth year of Guangxu (1893), the magistrate Wang Rouxuan raised donations to build the front gate, second gate, main hall, opera stage, drum pavilions, and other buildings.
In the Republican period the City God Temple twice burned down and was repaired from time to time. In the fifteenth year of the Republic (1926), when Du Yuesheng, Huang Jinrong, and others led a fundraising restoration, the whole main hall was rebuilt in reinforced concrete in antique style—resplendent and magnificent, the like of which Shanghai had never seen.
In 1994 Shanghai's Old City God Temple was restored and once again became a Taoist temple. Three City Gods are enshrined in the temple: Huo Guang, Qin Yubo, and Chen Huacheng.
From the Yongle era of the Ming (1403–1424) to the Daoguang era of the Qing (1821–1850), the grounds of the Shanghai City God Temple kept growing and its buildings kept multiplying. At its most prosperous, in the Daoguang era of the Qing, the Old City God Temple reached its peak, with a total area of nearly 50 mu, about 33,000 square meters.
Today the Old City God Temple includes the Huo Guang Hall, the Jiazi Hall, the Hall of the God of Wealth, the Cihang Hall, the City God Hall, the Hall of the Lady, and other halls, with a total area of more than a thousand square meters.
Around the Old City God Temple, commerce gradually developed, and the area became the oldest commercial district in Shanghai, lined with snack restaurants, antique shops, and small-goods markets.

2. The Core Beliefs of the City God Temple
As a Taoist temple, the Shanghai City God Temple has Taoist worship of deities at the heart of its faith. Most of the deities worshipped here possess great power to help the world and benefit people, to accumulate good deeds and virtue, and to drive out evil and suppress ghosts. In life, the deities enshrined here were loyal to their rulers and loved the people, governed with integrity, were upright and unbending, and benefited the people of their locality, and so after death they could become protective gods of their region. The City God is a local guardian deity in Taoism, symbolizing the protection of local peace and the well-being of the people.
Besides the City God, the temple also houses many other Taoist deities, such as Marshal Zhao the God of Wealth, Mazu the sea goddess, and Guanyin, who saves all beings. These deities represent the rich system of belief in Taoist culture.
The Shanghai City God Temple also enshrines Huo Guang, Grand General of the Han dynasty and Marquis of Bolu; the Censor Qin Yubo, Academician-in-Waiting and City God, Earl of Manifest Protection of the fourth rank; and Chen Huacheng, national hero of the Qing dynasty and provincial military commander of Jiangnan.
3. Taoist Architectural Features of the Shanghai City God Temple
The architecture of the Shanghai City God Temple blends features of the Ming and Qing dynasties, combining the grandeur of northern architecture with the delicacy of southern architecture. The main buildings in the temple include the mountain gate, the main hall, the Yuanchen Hall, the Hall of the Parents, the Hall of the God of Wealth, the Hall of Lord Guan, and the Wenchang Hall—nine halls in all.
The main hall is the principal building of the City God Temple and enshrines the statue of the City God. Its roof is a double-eaved hip-and-gable roof with soaring upturned eaves, grand and imposing. The temple also has many fine stone, wood, and brick carvings, displaying the unique charm of ancient Chinese Taoist architecture.
The halls of the Shanghai City God Temple belong to the grand style of southern architecture, with red walls and clay tiles. The main buildings consist of the square in front of the temple, the main hall, the Yuanchen Hall, the Hall of the God of Wealth, the Cihang Hall, the City God Hall, the Hall of the Lady, and others.




The front hall (the main hall) honors the spirit tablet of Huo Guang, god of Jinshan, Grand General of the Han and Marquis of Bolu; the principal hall enshrines the Censor Qin Yubo and the national hero Chen Huacheng.

In front of the main hall stands a memorial archway built in 1535, and the opera stage was built in 1865.
A distinctive ceremonial gate: the ceremonial gate was the second main gate of a government office in the past. In front of it hang two couplets, and behind the couplets hangs a very large abacus carved with the words “Not Up to Human Calculation.” Its beads are set some up and some down, symbolizing that the divine realm is “adding, subtracting, multiplying, and dividing” the good and evil deeds and merits of the people of the world.
The great abacus hanging in the City God Temple carries a profound meaning. On the one hand it tells believers to be indifferent to fame and gain, not to be selfish, and not to haggle over every little thing. For people calculate and heaven calculates too, and human calculation is never a match for heaven's; those who calculate too much will reap what they sow. On the other hand it proclaims to the world that heaven's calculation is the Way of Heaven, which has its own laws: only those who follow the Way of Heaven come to a good end, and those who go against it will surely bring about their own destruction.
The main hall is the City God Temple's main hall rebuilt in 1926, an antique-style hall built entirely of reinforced concrete.

The Hall of the Lady enshrines Lady Chu, wife of the City God of Shanghai County. Lady Chu was the daughter of a prominent family of the Zhoupu area. At that time the Chu family of Zhoupu was highly respected; their ancestor was the Song lyric poet Chu Yong (c. 1101–1165, courtesy name Wenqing, literary name Huagu), who followed the Song court south and lived in retirement in the Zhoupu area.
The City God Hall is the last hall of the City God Temple. At its center is enshrined the City God of Shanghai County, a red-faced wooden statue sitting solemnly upright. The hall is furnished in imitation of the courtroom of a Ming-dynasty county office, with an imposing array of ceremonial insignia.
East of the City God Hall is the Hall of the Parents, which enshrines the parents of the City God of Shanghai County.
4. The Rich and Varied Folk Customs of the Shanghai City God Temple
The Shanghai City God Temple is not only a place where Taoist culture is spread but also a gathering place of folk culture. Every year on the twenty-third day of the third month of the lunar calendar, the birthday of the City God, the temple fair is especially lively. Devotees from all directions come to worship and pray for peace and safety. During the fair there are also folk activities such as dragon dances, lion dances, and opera performances, which let people feel a rich atmosphere of traditional culture.
In recent years the temple has actively held cultural events of all kinds, such as performances of Taoist music and exhibitions of Taoist painting, allowing more people to learn about and encounter Taoist culture. The temple is also committed to protecting and restoring its ancient buildings, giving this old Taoist temple new vitality.
5. City God Temple Culture Continues to Shape Society
As a Taoist temple with a long history, the Shanghai City God Temple has not only religious and cultural value but also far-reaching social influence. It has witnessed the development of the city of Shanghai and carries the faith and feelings of the people of Shanghai. It is also an important cultural tourist attraction in Shanghai, drawing many visitors.
As a building rich in religious and cultural meaning, the Shanghai City God Temple deserves in-depth study in its history, architecture, folk customs, and other aspects. By understanding and carrying on the culture of the Shanghai City God Temple, we can better understand Taoist culture and feel the charm of traditional culture.
6. Qin Yubo, the City God of Shanghai
Qin Yubo (1296–1373), courtesy names Weijing and Jingrong, literary name Rongqing, and alternative name Kuizhai, was a native of Shanghai County whose ancestral home was Huaiyang (today's Yangzhou, Jiangsu); he was known as Qin Jingrong. A statesman, writer, and calligrapher of the late Yuan and early Ming, he was an eighth-generation descendant of Qin Guan (Shaoyou), the famous writer and lyric poet of the Northern Song, and together with his younger brother Qin Hengbo he was known as “the Two Qins.” He served as registrar of the Huguang Branch Secretariat (in charge of reviews and audits), magistrate of Gaomi County in Shandong, director in the Fujian Branch Secretariat, attendant censor of the Branch Censorate, general administrator of Yanping Circuit concurrently in charge of encouraging agriculture, Academician Reader-in-Waiting, Academician-in-Waiting, and secretarial censor. He was diligent in government and loved the people, and was deeply loved by them in return. When he resigned from office, the people wanted him to stay but could not keep him, so they specially asked Ming Shan, a director in the Ministry of Rites in Dadu (today's Beijing), to write the Stele Record of Remembrance for Magistrate Qin, recording his achievements in detail. Later he three times refused orders from the Hongwu emperor, Zhu Yuanzhang, founder of the Ming, summoning him to serve at court.

During Qin Yubo's lifetime, Zhu Yuanzhang summoned him three times, and three times he declined. It was also said that Qian Hegao in the Shanghai area might become a vengeful ghost and cause trouble for a long time, so after Qin Yubo died Zhu Yuanzhang remained uneasy. To win over the prominent gentry south of the Yangtze, he resolved that “he who would not be my minister in life shall guard my land in death.” So in the sixth year of Hongwu of the Ming, he posthumously made Qin Yubo Earl of Manifest Protection, calling him “the City God of the City of Shanghai, Chief of the Hall,” and later posthumously granted him the title Duke Who Protects the Sea. Later generations called him Qin Xianyou or Duke Xianyou. The History of Ming records: “Yubo was learned and eloquent in argument; his memorials all suited the emperor's wishes, and the emperor praised him many times.” Later Qin Yubo was again appointed by imperial order as the City God, Earl of Manifest Protection of the fourth rank (City God and Earl of Manifest Protection of the Censorate, of the principal fourth rank), and has received incense offerings for a hundred generations.
