Taiwan's First County Chenghuang(City God) Temple was established in 1704 during the Kangxi reign of the Qing Dynasty as the official City God Temple for Taiwan County. Initially located beside the county magistrate's office in Dong'an Ward (near today's Tainan Station and Chenggong Road intersection), it was moved in 1750 under Prefect Fang Bang‑ji to the east of Chihkan Tower, then again relocated north of the county office the following year.
Magistrate Xue Zhi‑liang expanded the temple in 1807 by adding two side corridors, enlarging its footprint. During Japanese rule, the temple was seized for military use and later converted into army barracks. In 1908, local officials purchased and rebuilt it at its current site on Lane 238, Chenggong Road. After WWII, a major restoration was completed in April 1966, followed by the addition of a Dizang Hall in 1968. Due to beam decay, a fundraising campaign in 1978 funded a full reconstruction, completed in January 1980, giving the temple its present form.