The temple is dedicated to Kaizhang Shengwang or Tan Goan-kong, a Tang dynasty official who was instrumental to the founding and development Zhangzhou in Fujian Province, a region where many have migrated to Taiwan from.
In 1795, there was a rebellion against Qing dynasty officials organized by Quanzhou Tiandihui leader Chen Zhou-chuan [zh].
Beginning in 1971, Shengwang Temple was used as a privately owned child care center until 1982, when the owners closed it due to concerns about the building's structural integrity.
On 27 November 1985, Shengwang Temple was protected as a level two national monument in Taiwan, which allowed for more renovation work to be done.
[2][3] In 2020, researchers discovered that the painted menshen on the doors have two additional layers underneath, the earliest of which dates from at least 1912.