I read this book very long ago, I forgot most of it.
In this novel, magic works, but it is very close to "our" world. Some historical figures are common with ours.
Some guy tried some magic that did not work as he had hoped, and a curse fell on him. So to survive he had to swap often his mind into someone else's body, and each time he did it, he managed to put his previous body in a fatal situation, so the mind that went into that body died, not to be able to "tell on him" (because of course that mind knew in what body the killer was, it was the mind's original body!). That worked for quite a few times until once he miscalculated and the old body survived. So the surviving other mind tried to get at him, and eventually did succeed.
There were many more things, it was a very rich novel, but I cannot remember anymore to help narrow it down, sorry.
There might have been time-travel, too, but I am not sure.
I think, but am not sure, that the main character is a time traveller stuck in the past, and he is the one who escapes death in the last-but-one body occupied by the killer, and kills the latter at the end. But this is a bit of a reconstruction, I am not really sure of that.