city temple Shanghai
Shanghai City God Temple
The old city's temple to its guardian gods

A major urban Taoist temple at the heart of Shanghai's Old City, adjacent to the Yu Garden, and one of the clearest surviving examples of the Chenghuang (City God) cult — a category of protective deity assigned specifically to individual Chinese cities, typically the deified spirit of a historical local worthy. Shanghai's temple uniquely enshrines three such figures together: Huo Guang, a Han-dynasty statesman; Qin Yubo, a Yuan-Ming scholar-official posthumously named the city's tutelary god by the Ming founder; and Chen Huacheng, a Qing-dynasty naval commander who died defending Shanghai's approaches and was later honored with City God status for his loyalty.
Sacred narrative
The layered cult of three City Gods
The Chenghuang cult rests on a distinctly Chinese theological idea: that every walled city has its own protective deity, typically the spirit of a historical figure judged worthy of the office by imperial recognition or popular consensus, charged with guarding the city's welfare and, in folk cosmology, keeping a register of its residents' conduct. Shanghai's temple layered this office across three separate historical men rather than one: Huo Guang, honored for statesmanship centuries before Shanghai existed as a city in its own right; Qin Yubo, the temple's original and principal City God, recognised in the early Ming dynasty; and Chen Huacheng, added centuries later after his death defending the city's river approaches, an addition that shows the cult remained a living, expandable institution rather than a fixed roster closed off after its founding.
History
Founded 1403, early Ming (Yongle era), when an existing shrine to the god of Jinshan was rededicated as Shanghai's City God Temple.
Key figures
- Qin Yubo, Yuan-Ming scholar-official, principal City God
- Huo Guang, Han-dynasty statesman, co-enshrined City God
- Chen Huacheng, Qing-dynasty naval commander, later co-enshrined City God
Major events
- 1403: temple founded on the site of an earlier shrine, rededicated to Shanghai's City God
- Ming dynasty: Qin Yubo formally recognised as Shanghai's tutelary City God
- Qing dynasty: Chen Huacheng later added as a co-enshrined City God following his death in the defense of Shanghai
- Ongoing: maintained as an active temple and major stop within the adjoining Yu Garden tourist and commercial district
Today
The site as it currently stands.
Central Shanghai, in the Old City adjacent to Yu Garden; open daily with an entrance fee
Year-round
Shanghai
Active resident Taoist clergy; major festivals (including the City God's procession) draw large crowds
peak season
Back to the geography
Return to Sacred sites, or read the concepts practised there.