doyle got the phrase from a scotland yard inspector. the inspector was referring to a real-life criminal. the character was introduced to allow doyle to kill sherlock holmes, and only featured in two of the sherlock holmes stories. later, he has often been treated as holmes' archenemy.