The City God Temple or Chenghuang Miao (Shànghǎi Chénghuángmiào) is a temple located in Shanghai, China, within the old walled city. Today the "City God Temple" not only refers to the large temple complex, but also the traditional district of commerce in the city, surrounding the temple. There are over a hundred stores and shops in this area, and most of these store buildings are nearly a century old. The temple connects to the Yuyuan Garden, another landmark of the old city.The City God Temple in Shanghai originated as the Jinshan God Temple, dedicated to the spirit of Jinshan, or "Gold Mountain", an island off the coast of Shanghai. It was converted into a City God Temple in 1403, during the Yongle era of the Ming dynasty.
During the Qing Dynasty, the temple grew popular. Residents of the old city as well as nearby areas visited the temple to pray for good fortune and peace.