The Valley of Fear
The model which Doyle himself cited (through Sherlock Holmes) in "The Valley of Fear" is the London arch-criminal of the 18th century, Jonathan Wild. He mentions this when seeking to compare Moriarty to a real-world character that Inspector Alec MacDonald might know, but it is in vain as MacDonald is not so well read as Holmes.