"You have probably never heard of Professor Moriarty?" said he.
"Ay, there's the genius and the wonder of the thing!" he cried.
Sherlock Holmes to John H. Watson, MD
The Final Problem
Indeed. By the time The Final Problem was published in December, 1893 in Strand Magazine, Sherlock Holmes was a widely-known and celebrated character. In fact, for his creator Arthur Conan Doyle, too celebrated. Tired of the demands of the Holmes stories, Doyle set out to kill off his hero - a victor of countless scrapes and sports with the Victorian underworld both physical and mental.
So how to do it? And, more importantly, how to do it in a manner worthy of the great detective?
Conan Doyle resorted to a device well-known by modern adventure yarn writers, especially those of the comic books. He created a nemesis. A counterweight to his protagonist; an opponent worthy of the name. This device was familiar in the days of the ancient Gods, when each member of the pantheon had a particular opponent he or she sparred with; it was familiar all through history, especially the history of literature. These nemeses have several characteristics by which they can be recognized. For one, they must possess a power, or trait, or skill, or habit (whatever is appropriate) which places them naturally directly opposite the protagonist in any affair in which both are involved.
This difference is made more powerful the more subtle it is. A difference in motive but not in method, for example, is more effective than a difference in goals and methodology. Part of the power of the nemesis is the hint of ambiguity which gives us a glimpse into the struggle of our protagonist. The closer the two are, the more poignant the conflict! An accident of time or birth or happenstance, as opposed to a hugely deterministic difference in origin or power will typically result in a much more 'satisfying' nemesis.
"Our methods have not differed as much as you pretend. I am but a shadowy reflection of you. It would take only a nudge to make you like me. To push you out of the light."
"Now you're getting *nasty.*"
Dr. René Belloq to Dr. Indiana Jones
Raiders of the Lost Ark
I choose Dr. Belloq deliberately there, because his turn as nemesis shares one with Moriarty, which is important. He was introduced in the same work as his downfall. He had an advantage, in that that work also introduced Jones as the protagonist, but never mind that now. The death of Holmes hit the Victorian world like a thunderbolt. Conan Doyle himself had no idea of the storm of protest that his decision would whip up. In the end, he acquiesced to the (strongly expressed) will of the reading public, and resurrected Holmes, but when Moriarty was introduced, he was introduced for a single purpose - to bring about the end of Sherlock Holmes, and to do so in a worthy manner.
Professor James Moriarty, or simply 'Professor Moriarty' as he is most often referred to, was a 'dark Holmes.' He, too, relied on the powers of his brain - those of organization, of deduction, of plotting and scheming. However, where Holmes used his talents to investigate transgressions of the law, Moriarty used his to plan, instigate, and execute those same crimes. Holmes, it turns out at the beginning of the story, has been wholly engaged in a private war with a shadowy opponent. As he tells his confidant Watson, his many investigations have led him to the same shadow, and he has been devoting his time, his energy, and his fists when necessary to discovering the nature of this other.
"He is the Napoleon of crime, Watson. He is the organizer of half that is evil and of nearly all that is undetected in this great city. He is a genius, a philosopher, an abstract thinker. He has a brain of the first order. He sits motionless, like a spider in the centre of its web, but that web has a thousand radiations, and he knows well every quiver of each of them. He does little himself. He only plans. But his agents are numerous and splendidly organized. Is there a crime to be done, a paper to be abstracted, we will say, a house to be rifled, a man to be removed -- the word is passed to the professor, the matter is organized and carried out. The agent may be caught. In that case money is found for his bail or his detence. But the central power which uses the agent is never caught -- never so much as suspected."
The Final Problem
Moriarty, we are told, was a man 'of good birth and excellent education...endowed by nature with a remarkable mathematical faculty.' He is qualitatively different from the thugs and even the plotters of the 'normal' London underworld, and for good reason - because he is so very close to Holmes himself. This is a personal interpretation, but I always felt that one of the reasons that Holmes was so intent on defeating Moriarty was not just because the man was a 'worthy opponent' but because he, Holmes, could so easily have been Moriarty - and his fight to take down the Professor was a fight to define himself. Fitting for the last story before his death.
Of course, it didn't turn out that way. Doyle resurrected Holmes in The Adventure of The Empty House, published in 1904 and set three years after the events of The Final Problem. Moriarty turns up in that story as a memory and as a motive for Holmes' peripatetic sabbatical - Holmes, it turns out, was fleeing the 'post-mortem' arrangements for revenge that Moriarty and his organization set upon him. Even in death, Moriarty's skill and reach was such that Holmes could only flee and try to evade.
This, naturally, led to some problems - metaproblems, really, because they deal with the world above the literary one. In the beginning of The Final Problem, Holmes asks Watson the question above - if he, Watson, has heard of Moriarty, and Watson replies that he has not. However, in the Holmes novel The Valley of Fear, written a decade or so later, Conan Doyle has Holmes and Watson run across traces of the professor and his organization - but in a flashback from before The Final Problem was set. Ah well.
In any case, in the original story, Holmes and Moriarty fight each other to a standoff. Holmes and Watson have decamped to Switzerland and are staying in Meiringen. Moriarty, whose position has been rendered quite untenable by our hero, trails the two there, confronts Holmes, and the two of them head into the mountains to Reichenbach Falls where they fight mano a mano. The two of them fall from the heights into the foaming white water of the caldera, and that is the end (temporarily) of Sherlock Holmes, and (permanently) of Moriarty.
So, for a man who only appears in person in a single Sherlock Holmes story (despite being mentioned in five or six) Moriarty makes the greatest impact on our hero of any of Holmes' opponents, save perhaps The Woman Irene Adler.