The temple is allegedly founded by Cai Qian, an infamous pirate in the Qing Dynasty.
[1] According to tradition, when Cai was harbored in Dongyin, he saw a farmer and his cow cutting down a wheat field on a hill even though it was too early for harvest.
Since food was scarce, Cai climbed the hill to investigate, but the farmer, cow, and field had all disappeared.
However, from the vantage point, Cai then saw several Qing ships sailing towards Dongyin, so he hastily ordered his men to leave the island.
Cai believed that his vision was a spirit protecting him, so he returned to the island to build a Mazu temple, where he also placed statue named Limai Dawang (犁麥大王, lit.