While reading Hawthorne's The Marble Faun, I came across a reference to a "necromancer", a white-haired old magician who uses his powers to divine the secrets of the distant past. Essentially, he is a device by Hawthorne to suggest a possible truth to a legend older than history might plausibly record.
I was reminded that the term "necromancer" once referred to what might also be called a "spiritualist" -- a diviner who communes with spirits.
In much modern fantasy, a "necromancer" is more likely to be a particularly morbid and ghoulish death-mage, who creates zombies and animates skeletons, and otherwise uses his magic to muck around with corpses.
The earliest stories I can think of that feature this modern type of "necromancer" are the stories of Clark Ashton Smith. And the earliest clear example of this, that I can think of, is "The Empire of the Necromancers", published 1932 - the first Zothique story. And of course there are more "necromancers", of the ghoulish, corpse-mage type, in future CAS stories, particularly those set in Zothique, such as "Necromancy in Naat".
Earlier CAS stories, such as "The Last Incantation" and "The Necromantic Tale", use the word in its more-or-less traditional sense.
The only precedent I can think of for this type of "necromancer" is Joseph Curwen from H.P. Lovecraft's "The Case of Charles Dexter Ward". However, Curwen, though he also mucks around with corpses, is called a "necromancer" for the more-or-less traditional reason that he communes with the dead in order to learn their secrets. Also, "The Case of Charles Dexter Ward" was not published until after Lovecraft's death; I am not clear if Clark Ashton Smith ever got a chance to read it.
Of course, HPL did invent the "Necronomicon", which might have helped influence Smith's ideas of "necromancy".
So, did CAS essentially invent the modern fantasy "necromancer" as a ghoulish, corpse-enchanting death mage? Or are there other precedents that I have overlooked?