The Final Problem
Doyle's original motive in creating Moriarty was evidently his intention to kill Holmes off. "The Final Problem" was intended to be exactly what its title says; Doyle sought to sweeten the pill by letting Holmes go in a blaze of glory, having rid the world of a criminal so powerful and dangerous that any further task would be trivial in comparison (as Holmes says in the story itself). Eventually, however, public pressure and financial troubles impelled Doyle to bring Holmes back. While Doyle conceded to revealing that Holmes did not die during "The Final Problem" (as Watson mistakenly concludes), he chose not to undo Moriarty's death in a similar fashion. For this reason, the later novel "The Valley of Fear" features Moriarty as an active villain but is specified to take place before the events of "The Final Problem".