The location of the temple used to be called GuiZi Hill (KuiDou Hill). In 1683， the Qing Dynasty forces invaded Taiwan and defeated Ming Prince of Ningjing (Zhu Shugui)， who committed suicide. Rather than be left to an uncertain and inglorious fate in the hands of the Qing， the five concubines chose to end their own lives as well. The names of the five concubines were Lady Yuan， Lady Wang， Xiugu， Sister Mei， and Sister He. Their tombs and alters were placed in the Shrine. And the bodies of their two eunuch servants were also buried here (The Righteous Spirit Shrine).