I have figured he was a necromancer also. But more likely it wasn’t Mystra that was his mistress, but Shar. I suspect he was actually trying to gift Shar a remnant/sliver of her now unstable/defunct Shadow weave. That could also explain his lost spell casting abilities.
Note how easy he recognized Shadowhearts “shadows for eyes” when first meeting him.