Someone who is overly interested in dead bodies — even feeling an attraction toward them — suffers from necrophilia.
Use the noun necrophilia to describe a person's fascination with, and sexual attraction to, corpses. There is some evidence that members of the Moche civilization, in what is now Peru, believed that sex with dead bodies provided a spiritual connection with the deceased, but necrophilia has mostly been a rare and abnormal occurrence. The word comes from the Greek nekros, "death," and philia, "love or affection."