The main deity: Chenghuang Ye. In ancient times, "Chenghuang" referred to the city and the moat surrounding it. The moat with water is called "Chi," while the one without water is called "Huang." Therefore, "Chenghuang" means the city's ditch and moat, referring to the deities that protect the city. In the belief that all things have spirits, the high and protruding city and the low and depressed moat serve defensive functions, and maintain the safety of the entire city's people. It is natural for people to worship the city and moat. During the Ming Dynasty, the military garrison of the Thousand Households was established in the Kinmen City. Since there was a city and many residents, there was naturally a Chenghuang Temple built to protect the city and moat. In the late Ming Dynasty, Kinmen City was destroyed by bandits and war, and was rebuilt during the Qing Dynasty.