Necrophobia

Necrophobia or thanatophobia is fear of death or dead things, e.g, corpses, as well as things associated with death, e.g., coffins, etc. The former term is derived from Greek nekros for "Dead body, corpse" and suffix -phob- for "fear". The latter term is derivied from Thanatos (θάνατος: "death") is the personification of death. The usage differs, although in common speech the terms are used interchangeably. Thanatophobia does include but is not limited to the fear of personal death or dying.

Causes
Evolutionary psychologists consider this phobia as promoting survival through natural selection. Someone who has an overwhelmingly strong fear of death is less likely to put themselves into a situation where death is likely to take place, whereas an non-necrophobic person would much more readily take the risk, making the latter more likely to perish and be unable to pass their genes onto their offspring, and vice-versa regarding the necrophobic.

However, the actual origin of phobias in general is a much disputed case among psychologists.