Judge Dee (also, Judge Di) is a semi-fictional character based on the historical figure Di Renjie , magistrate and statesman of the Tang court. The character first appeared in the 18th century Chinese detective novel Di Gong An. After Robert van Gulik came across it in a second-hand book store in Tokyo, he translated the novel into English and then used the style and characters to write his original Judge Dee stories.
The series is set in Tang Dynasty China and deals with various criminal cases solved by the upright Judge Dee (judges often play the investigator role in ancient Chinese crime stories).
Source: Wikipedia, "Judge Dee", available under the CC-BY-SA License.