As artificial intelligence technology advances, it is necessary to imitate various biological functions to complete more complex tasks. Among them, studies have been reported on the nociceptor, a critical receptor of sensory neurons that can detect harmful stimuli. Although a complex CMOS circuit is required to electrically realize a nociceptor, a memristor with threshold switching characteristics can implement the nociceptor as a single device. Here, we suggest a memristor with a Pt/HfO/TaO/TaN bilayer structure. This device can mimic the characteristics of a nociceptor including the threshold, relaxation, allodynia, and hyperalgesia. Additionally, we contrast different electrical properties according to the thickness of the HfO layer. Moreover, Pt/HfO/TaO/TaN with a 3 nm thick HfO layer has a stable endurance of 1000 cycles and controllable threshold switching characteristics. Finally, this study emphasizes the importance of the material selection and fabrication method in the memristor by comparing Pt/HfO/TaO/TaN with Pt/TaO/TaN, which has insufficient performance to be used as a nociceptor.