Shanghai City God Temple is a Taoist temple in Shanghai's Old Town, located at 249 Middle Fangbang Road, Huangpu District. First built during the Yongle era of the Ming Dynasty (1403–1424), it enshrines three City Gods: Huo Guang of the Western Han Dynasty, Qin Yubo from the late Yuan and early Ming period, and Chen Huacheng of the late Qing Dynasty. That's why locals often call it "one temple, three City Gods." It sits right next to Yu Garden and the Yu Garden Bazaar, but the three are not the same thing: the City God Temple is the temple itself, Yu Garden is a private garden from the Ming Dynasty, and the Yu Garden Bazaar is the commercial district that grew up around the temple square. On your first visit, explore the temple's central axis and side halls before heading over to Yu Garden—half a day is enough to understand the history of this old neighborhood.
What is the Shanghai City God Temple: From Huo Guang Shrine to County City God Temple
In traditional belief, a City God is a deity who protects a city. In the past, almost every place that was established as a county seat or walled town built a City God Temple. After Shanghai became a county, Zhang Shouyue, the Shanghai magistrate during the Yongle era of the Ming Dynasty, converted an existing shrine to Huo Guang into a City God Temple. From then on, the Huo Guang Shrine and the City God Temple shared the same site, which is why Huo Guang is still enshrined here today.
The temple isn't very large, covering about 3,000 square meters. It faces south, with buildings arranged along a north-south central axis and several halls on either side. Today it is a municipal-level cultural heritage site in Shanghai. Many people think "City God Temple" refers to the entire shopping street, but the actual temple only occupies a corner of the Old Town—the temple grounds begin once you pass through the gate, while the bustling streets outside belong to the Yu Garden Bazaar.
The temple's layout has been altered many times over the centuries. The main hall you see today was rebuilt in 1926, and its furnishings, plaques, and statues were gradually restored later. Knowing this, you won't mistake everything in the main hall for original Ming Dynasty artifacts, but will instead appreciate it as a living urban temple that has been continuously used and maintained.
To explain "Chenghuang" (City God) to someone encountering Chinese folk religion for the first time, think of it this way: the City God is like a guardian deity of a city. In the past, newly appointed local officials would first pay their respects at the City God Temple to show they were taking responsibility for the town. When ordinary people faced droughts, floods or illness, they also came to the temple to pray for safety. That's why City God Temples were usually built in the center of a county seat, close to the government office and the market. Shanghai City God Temple sits deep within the old walled city, a remnant of exactly this urban layout. The walls of Shanghai's old county town were first built in 1553 (the 32nd year of the Jiajing reign of the Ming Dynasty), with a circumference of about 4.8 km. Starting in 1912, the northern half of the wall was torn down to build a road—today's Renmin Road—and in 1914 the southern half was removed to create Zhonghua Road. In other words, the loop formed by Renmin Road and Zhonghua Road marks the old county town. The walls are gone, but the City God Temple still stands in its original spot.
One temple, three City Gods: who are Huo Guang, Qin Yubo and Chen Huacheng?
There are plenty of City God Temples across China, but it's rare for one temple to enshrine three City Gods at once. This is the most interesting thing to share with your travel companions here. The three City Gods come from three different eras and had completely different backgrounds:
Huo Guang was a powerful minister of the Western Han Dynasty. Entrusted by Emperor Wu on his deathbed to assist in governing, he served as regent under Emperors Zhao and Xuan, holding power for nearly 20 years. The predecessor of Shanghai City God Temple was a shrine dedicated to Huo Guang, and when it was rebuilt during the Ming Dynasty, his worship was retained, making him the oldest figure honored here.
Qin Yubo was a scholar from the late Yuan and early Ming dynasties. After the Ming Dynasty was established, he was revered as the City God of Shanghai county, and locals often consider him the true "Lord City God of Shanghai."
Chen Huacheng was a late Qing Dynasty general who served as the Jiangnan military commander. He died in battle defending Wusongkou against British forces during the Opium War in 1842. Out of respect for his sacrifice defending the land, the people of Shanghai later enshrined him in the City God Temple as well.
These three figures—a Han Dynasty statesman, a local luminary and a modern-era war hero—perfectly embody the City God's role of "protecting a city." If you're visiting with kids or friends from abroad, explaining who these three men were before entering the main hall will make the visit far more engaging.
Along the central axis: temple gate, stage, main hall and rear hall
The main buildings of City God Temple line up along the central axis: the temple gate, second gate, stage, main hall and rear hall. Walking north from south in this order means you won't miss anything and won't need to double back.
The temple gate and second gate mark the transition from the streets into the temple. Outside is the bustle of the shopping area; once you pass the second gate, it gets noticeably quieter.
The stage was once used for performances honoring the gods. It faces the main hall directly — a "stage-facing-hall" layout common in Jiangnan City God Temples. Standing in front of the stage and looking back toward the main hall gives you a great shot of the central axis.
The main hall is the heart of the temple, with an incense burner in the courtyard and the City God enshrined inside. As mentioned earlier, the main hall was rebuilt in 1926 but retains its traditional form — take a closer look at the upturned eaves, bracket sets and painted decorations.
The rear hall sits at the north end of the central axis and is quieter than the rest. After the buzz of the main hall, it's a good place to pause and admire the details of the beams, doors and windows. Walking the entire central axis usually takes 20 to 30 minutes, a bit longer when it's crowded.
On either side of the central axis: Yuanchen Hall, Caishen Hall, Wenchang Hall and Yuelao Hall
Several other halls stand on both sides of the central axis. The temple has nine halls in total, including the Main Hall, Yuanchen Hall, Fumu Hall, Guansheng Hall and Wenchang Hall. Each hall enshrines different deities, which can be understood roughly as follows:
Yuanchen Hall matches your birth year with a Yuanchen (Tai Sui, or Grand Duke Jupiter). Many visitors look for the statue corresponding to their birth year. The statues in Yuanchen Hall are usually arranged according to the "Sixty Jiazi": the traditional Chinese calendar uses combinations of Heavenly Stems and Earthly Branches in a 60-year cycle, with each year assigned a presiding Tai Sui. To find yours, first determine the Stem-Branch name of your birth year—for example, 1990 was Gengwu and 2000 was Gengchen—then look for the matching spot in the hall.
Caishen Hall, dedicated to the God of Wealth, always draws heavy incense smoke, especially around Chinese New Year.
Wenchang Hall enshrines Wenchang Dijun, the deity who oversees academic success. During exam season, you'll often see parents bringing their children here.
Yuelao Hall is dedicated to the god of marriage and attracts many young visitors. There are also Yaowang Hall, Cihang Hall and others, each enshrining its own deity.
There are a few traditional customs to keep in mind when entering the halls: don't step on the threshold—just step over it; keep your voice down inside, and don't touch the statues or offering tables. On busy incense-burning days, follow the flow of the crowd when lining up to offer incense, and don't cut against the current or jump the queue. Even if you're not religious, you can treat the side halls as places to view the furnishings, plaques, and folk traditions. Note that whether photography is allowed inside depends on the signs posted on site, and never use flash. If you'd like to burn incense, the temple has designated areas for it—don't bring open flames into the halls.
A half-day route: visiting order from Yu Garden Station
If you only have half a day, the following route avoids backtracking and helps you dodge the busiest times:
Stop 1: Exit Yu Garden Metro Station and walk to the temple gate. Follow the "City God Temple" signs, and be sure to distinguish the temple entrance from the shopping mall entrance—the temple gate has an archway and red walls. Once inside, follow the on-site directions for your visit.
Stop 2: the central axis, south to north. Visit the temple gate, second gate, stage, main hall and rear hall in order. You'll spend the most time in the courtyard before the main hall, where incense smoke can be heavy when it's busy—keep children at a safe distance.
Stop 3: pick side halls based on your interests. You don't need to enter all nine halls. Visit Yuanchen Hall to find your birth year, then check out the God of Wealth Hall and Wenchang Hall, and you'll get a good overall sense of who is worshipped here.
Stop 4: leave the temple for Nine Zigzag Bridge and Huxinting Teahouse. This stretch is part of the shopping district and gets the heaviest crowds. For photos, shoot from the bridge entrance or the opposite bank.
Stop 5: enter Yu Garden or head to The Bund. If you want classical gardens, go into Yu Garden; if you'd rather see the Huangpu River, walk or take a taxi from the Old City to The Bund. The evening lights on The Bund and the night views around City God Temple bookend a day nicely.
The whole route takes about 3 to 4 hours. There aren't many steps inside the temple and most paths are flat, so strollers and older visitors manage fine. The shopping lanes, however, are narrow and crowded, so anyone with limited mobility should avoid weekend afternoons.
How are City God Temple, Yu Garden and Yu Garden Bazaar related?
This is the easiest thing to mix up before you arrive. Simply put: City God Temple is a Taoist temple; Yu Garden is a private garden from the Ming Dynasty; and Yu Garden Bazaar is the commercial district that gradually grew up around the temple, where Nine Zigzag Bridge, Huxinting Teahouse and the surrounding traditional-style buildings are located.
The three are linked by history. During the Qianlong reign of the Qing Dynasty, Yu Garden was designated as the temple's "West Garden," bringing the temple and garden under shared management. Shops and stalls soon gathered in front of and behind the temple, and "visiting City God Temple" gradually came to mean exploring the entire district. That's why searching "City God Temple" on maps today often leads you to the bazaar entrance rather than the temple gate.
The Huxinting Teahouse in the middle of the Nine-Turn Bridge was built during the Qianlong reign of the Qing Dynasty and is the most postcard-worthy building in the Old City. Around Chinese New Year each year, a lantern festival is held in the Yu Garden area, with the whole neighborhood hung with lanterns—the liveliest and most crowded time of the year. If you want to see the lanterns and visit the temple, we suggest entering the temple during the day and returning to the neighborhood at dusk for the lights.
When visiting, think of the three as stops within the same area: first enter the City God Temple to see the central axis and side halls, then walk to the Nine-Turn Bridge to see Huxinting, and finally enter Yu Garden to explore the gardens. Yu Garden requires a separate ticket and has its own opening hours; see our Yu Garden page for details.
How to get there, when to go, and which itinerary to choose
Getting there: Take Metro Line 10 or 14 to Yu Garden Station and use Exit 1 or 6; it's about a 5-minute walk. The Old City's lanes are narrow and parking is difficult, so the metro is much easier than driving. It takes about 20 minutes to walk here from The Bund, so you can combine both on the same day, or stroll over from Nanjing Road Pedestrian Street.
Timing: The City God Temple is open 08:30–16:30, closing much earlier than the bazaar and the night lights. To see both the temple and the night views, visit the temple in the afternoon, then head out to explore the neighborhood at dusk and wait for the lights—do it the other way around and you'll miss the temple. Crowds swell on holidays and on the 1st and 15th days of the lunar month, so for a quieter look at the halls, aim for a weekday morning.
Which to choose: First time in Shanghai and just passing through? Independent travel by metro works fine. Want to cover The Bund, the City God Temple, Yu Garden and Pudong in one day? Join a Shanghai day tour or a Shanghai group tour. Traveling with seniors or kids and don't want to navigate crowded transfers? A private car or a private guide to explain the three City Gods and Old City history is ideal, and station transfers can be arranged too. To customize an itinerary at your own pace, contact our customer service directly.
Tip for overseas visitors: Most signs inside the temple are in Chinese, with limited English. To understand the stories of the three City Gods and the deities enshrined in each hall, it's best to read this article beforehand or hire a guide. Shops in the Old Town area mostly use mobile payments—you can link your foreign bank card to Alipay or WeChat Pay in advance, but bring a little cash just in case. The narrow lanes of the Old Town can confuse phone GPS, so save the Chinese characters for "Yu Garden Station" and your hotel address on your phone to show taxi drivers.
5-day 4-night water town tour: Hangzhou (West Lake + Lingyin Temple and Feilai Peak) + two classic water towns (Wuzhen West Scenic Zone + Xitang) + Songcheng show
A 5-day 4-night private tour with airport transfers in Shanghai: visit Wuzhen East and West Scenic Zones, Xitang, Lingyin Temple and Feilai Peak, watch the Romance of the Song Dynasty show at Songcheng, enjoy a tea plantation photo shoot in Hangzhou, take a boat ride on West Lake, then return to Shanghai to explore City God Temple. Includes car, guide, 4 nights' hotel and admission tickets. English-speaking guide available upon request.
Oriental Pearl Tower and Disneyland 3-day, 2-night Shanghai tour (Nanjing Road, The Bund, Yu Garden Bazaar, City God Temple, Disneyland, Oriental Pearl Tower), no shopping stops
A 3-day, 2-night private tour with airport transfers in Shanghai: Nanjing Road, The Bund and Yu Garden on day one, a full day at Shanghai Disneyland on day two with an evening fireworks show (canceled in rain or if the show is suspended), and the Oriental Pearl Tower on the final day. Includes transport, guide, two nights' hotel and admission tickets. English-speaking guide available.
FAQs
Are Shanghai City God Temple and Yu Garden the same attraction?
No. City God Temple is a Taoist temple, while Yu Garden is a private garden from the Ming Dynasty. They sit next to each other and were once linked under the name "West Garden" during the Qianlong reign of the Qing Dynasty. Today they operate separately, and Yu Garden requires its own ticket.
How long does it take to explore City God Temple?
Just visiting the central axis and side halls takes about 40 minutes to an hour. If you want to include the Nine-Turn Bridge, Mid-Lake Pavilion and Yu Garden, set aside half a day.
Why is it called "one temple, three City Gods"?
This is because the temple enshrines three City Gods at once: Huo Guang of the Western Han Dynasty, Qin Yubo of the late Yuan and early Ming dynasties, and Chen Huacheng, who died fighting the British in the late Qing Dynasty. This is quite rare among City God Temples.
Do I need a ticket for the Shanghai City God Temple?
The temple's ticket policy has changed in recent years, and information varies by source. Please check the notices on site for the latest details. Yu Garden is a separately ticketed garden and is not included in the temple visit.
Can I enter the City God Temple at night?
The temple is open until 16:30, so you can't enter the halls at night. In the evening, you can explore the surrounding Yu Garden Bazaar area and enjoy the night lights. If you want to see the temple itself, plan your visit during the day.
For more details on transportation, opening hours and nearby attractions, check out the Shanghai City God Temple page.