It is a fiction based on the real character of Judge Dee (Ti Jen-chieh or Di Renjie - chin: 狄仁傑), a magistrate and statesman of the Tang court, who lived roughly 630–700.
This story is based on the historical figure of Judge Dee (Ti Jen-chieh or Di Renjie - chin: 狄仁傑), a magistrate and statesman of the Tang court, who was active around 630–700.