Pain as an instinctive reaction can protect the body from further injury, on the other hand, pain as a disease or a symptom is harmful to human health. Due to the restriction of research techniques, our acknowledgment of brain structures that regulate pain behavior is limited and not profound. Since the beginning of the 21st century, the emergence of highly specific viral tools, as well as observation and intervention methods based on it, has greatly improved the understanding of pain brain mechanisms. In this review, we briefly introduce the development and application history of optogenetics and chemogenetics and summarize the neural substrates of pain processing which were discovered based on these two techniques in different animal models. At last, we discuss and prospect the possible research directions of the mechanism of pain neural circuits.