[1] Gongfan Temple's history can be traced to 1685, when a Linji school monk named Chunzhen Chanshi (純真禪師) traveled across the Taiwan Strait from Meizhou Island in mainland China to a settlement west of downtown Mialiao known as Haifeng Port (海豐港).
A temple was built there to house the Mazu statue that Chunzhen Chanshi carried, which is known as Kaishan Liuma (開山六媽).
In 1827, a rear hall was added to worship Guanyin, built on land donated by a local businessman, into its current three by three grid formation.
In 1874, the building showed signs of deterioration; even though some proposed to repair the temple, the construction halted halfway due to insufficient funding.
[3] According to the Bureau of Cultural Heritage, the temple was primarily protected for the historical artifacts dating from the 1930 reconstruction.