This lively temple once served as the palace of Ning Jin, the last king of the Ming dynasty. If you wish to confirm visually that a king's status is lower than an emperor's, count the steps to the shrine. There are only seven; an emperor would get nine.
Right before the king’s death, the palace was converted to a Mazu temple according to his last wish. Some features to note include the 300-year-old Mazu statue and, in the back, the shrine to Mazu's parents in an area that used to be the king's bedroom. Look up and you'll see the roof beam from which the king's concubines hanged themselves so many years ago; those women are honoured in the Wufei Temple.