Near-death experiences are known from all parts of the world, various times and numerous cultural backgrounds. This universality suggests that near-death experiences may have a biological origin and purpose. Adhering to a preregistered protocol, we investigate the hypothesis that thanatosis aka. death-feigning, a last-resort defense mechanism in animals, is the evolutionary origin of near-death experiences. We first show that thanatosis is a highly preserved survival strategy occurring at all major nodes in a cladogram ranging from insects to humans. We then show that humans under attack by animal, human and “modern” predators can experience both thanatosis and near-death experiences, and we further show that the phenomenology and the effects of the two overlap. In summary, we build a line of evidence suggesting that thanatosis is the evolutionary foundation of near-death experiences and that their shared biological purpose is the benefit of survival. We propose that the acquisition of language enabled humans to transform these events from relatively stereotyped death-feigning under predatory attacks into the rich perceptions that form near-death experiences and extend to non-predatory situations.