In 1661 Ming loyalist Koxinga (Cheng Cheng-kung) led his army to Taiwan with plans to restock supplies and then retake the mainland, which by that point had been all but conquered by the Manchus. He found the Dutch already here, but after nine months' battle they surrendered and departed Taiwan.
Koxinga did much to improve conditions on the island. But, like the KMT of modern times, he did not live to see the mainland retaken. He died after only a year in Taiwan, and his grandson surrendered to the Manchus in 1683.
The original southern-style temple was rebuilt in a northern style by the KMT government in the '60s. Many of the artefacts are historical, however, including the boxes in the shrine that hold the original imperial edict from 1874, which permitted the shrine’s construction.