 This paper proposes a pain detection framework based on electroencephalogram, EEG, and deep convolutional neural networks, CNN. The proposed method was tested using data collected from 10 chronic back pain patients. The results showed that the CNN model achieved a high accuracy of 0.83 and hashtag X00B1, 0.09 in movement stimulation, MS, phase and 0.81 and hashtag X00B1, 0.15 in video stimulation, VS, phase. Additionally, the CNN model was able to identify specific areas of the brain that were activated when the patient experienced pain. These findings suggest that this method could be used as a reliable tool for pain detection. This article was authored by Duo Chen, Hai Hong Zhang, Parampadapal Thomas Kavitha, and others.