The relationship between Sherlock Holmes and Moriarty is one of mutual antagonism and grudging respect.
Each man acknowledges the other as the best in his field; Holmes as a detective, Moriarty as an arch-villain. For Holmes, Moriarty is nothing more than "the Napoleon of crime," a kind of back-handed praise that recognizes his criminal genius while at the same time acknowledging his evil.
As for Moriarty, he will never have a worthier opponent than Holmes. So long as Holmes is alive, Moriarty will never feel truly safe, knowing as he does that Holmes is by far and away the best detective in the world.
Holmes doesn't strictly need Moriarty around for mental stimulation. Most of his cases don't involve the arch-fiend, and yet he seems to derive plenty of mental stimulation from them. And as Holmes isn't always working on cases, there are inevitably times when his urgent need for stimulation can only be provided by drug use.
Even so, Moriarty is undoubtedly Holmes's most formidable opponent. And so long as he's alive and carrying out his wicked criminal schemes, the mind of the world's greatest detective will to continue to be stimulated into action.