Look around first
What to notice
- Figure of an official in a cap and robe
- Official desk with brushes and a seal
- Assistants with bundles of case files
- Stone steles by the rear hall
The story of the place
The street beside the temple follows a filled-in channel bed: the canal once separated this bank from the county administration. In the early fifteenth century, the former shrine of a minister on the north bank was converted into a Shanghai City God Temple; the former patron kept the front hall, and the new one received the rear hall. Attendance at rites here was compulsory for county officials, and the temple community was Daoist. In the rear hall, the figure of its master is recognizable by an official's cap and robe, and stone steles stand nearby.
In sixteen oh one, Liu Yikuan, the new Shanghai county magistrate, came here to introduce himself to another chief as soon as he took office. That chief had died more than two centuries earlier.
City God is the name of an office. In Ming-dynasty Shanghai, an earthly official heard lawsuits and punished criminals, while his supernatural colleague, as city residents believed, kept account of the deeds of the living, judged the dead, and noticed what had been concealed from an ordinary court. He kept watch over the county magistrate himself as well. That was why an arriving official had to appear at the temple and pay his respects.
Shanghai residents associated this office with Qin Yubo, an official of the late Yuan dynasty and early Ming dynasty. The story that the emperor personally appointed him City God after his death was preserved primarily in the Qin family's tradition; the official chronicle contains no such decree. At the temple, Qin Yubo is depicted in a Ming official's cap and robe. Before him stands an official desk with brushes, an inkstone, a seal, and command arrows, while assistants hold bundles of case files.
The temple appeared on this site because, in the early fifteenth century, another county magistrate, Zhang Shouyue, converted the former shrine of the minister Huo Guang on the north bank of the Fangbang Canal. Across the water stood the county administration. The old patron was not displaced: Huo Guang kept the front hall, while Qin Yubo was assigned the rear one. The result was an administration with two chiefs and a full staff of clerks, judges, and day and night watchmen. Present-day Fangbang Middle Road follows the filled-in channel bed that once divided the earthly and supernatural services.
Liu Yikuan saw cramped, poorly arranged rooms. For a compulsory state cult, this was an administrative shortcoming. Through the temple, the new magistrate wanted to accustom residents to the idea that an offense does not disappear when a court case is closed. He proposed that the Daoists expand the complex and secured the support of Shanghai scholars and officials.
By the following autumn, construction was complete. Liu Yikuan received a proper place for compulsory rites, the Daoist community received an expanded temple, and those involved recorded their names and their plan on stone steles. One of them, dated sixteen oh five, described Liu Yikuan's first visit and the rebuilding.
Later, the steles were walled in and forgotten. In two thousand five, a truck delivering goods to the neighboring shopping complex knocked down a column of the temple stage. While dismantling the damaged wall, construction workers found three old steles, including the record about Liu Yikuan. It now stands beside the rear hall, next to Qin Yubo's office, his seal, command arrows, and the case files that the assistants are still holding before the City God.
Useful on site
According to a temple announcement published by city media citing the temple's channel: from 1 May to 30 September 09:00–17:00; from 1 October to 30 April 08:30–16:30; on the first and fifteenth days of the lunar month, opening is from 06:00; special holidays are announced separately. The official website also gives daily hours of 08:30–16:30; final verification is required before import.
Checked: July 1, 2026. Check the official source before visiting.This is an active place of worship: give way to worshippers, do not block access to altars, and check local restrictions before taking photographs.
