The subject of the study is the issue of necrophilia, which is a disorder of sexual preferences. This phenomenon is presented both in medical and criminal law terms – using the formal (dogmatic-legal) method. Additionally, based on the analysis of one of the cases covered by the case file research, difficulties that may occur during criminal proceedings in connection with issuing an opinion on the sanity of the perpetrator of a sexual crime committed on a corpse (empirical method) are shown. The aim of this paper is to present necrophilia as one of the disorders of sexual preferences rarely discussed in the literature, which from the perspective of criminal liability remains marginalized, especially in comparison with pedophilia. Doubts regarding the sanity of the perpetrator apply not only to the crime of murder combined with rape or desecration of a corpse, but also to other acts committed against the body of a deceased person. The research results and the formulated conclusions allow for determining the legal and criminal status of necrophilia as a disorder of sexual preferences and identifying the difficulties occurring in the practice of giving court opinions in cases concerning perpetrators of such crimes.