Medication is the main approach for early treatment of herpes zoster (HZ), but it could be ineffective in some patients. It is highly desired to predict the medication responses in order to control the degree of pain for HZ patients. The present study is aimed to elucidate the relationship between medication outcome and neural activity using electroencephalography (EEG) and to establish a machine learning model for early prediction of the medication responses from EEG. Methods We acquired and analyzed eye-closed resting-state EEG data 1-2 days after medication from 70 HZ patients with different drug treatment outcomes (measured 5-6 days after medicaiton): 45 medication-sensitive pain (MSP) patients and 25 medication-resistant pain (MRP) patients. EEG power spectral entropy (PSE) of each frequency band was compared at each channel between MSP and MRP patients, and those features showing sigificant difference between two groups were used to predict medication outcome with different machine learning methods. Results MSP patients showed significantly weaker beta-band PSE in the central-parietal regions than MRP patients. Based on these EEG PSE features and a k-nearest neighbors (k-NN) classifier, we can predicate the medication outcome with 80% ± 11.7% accuracy, 82.5% ± 14.7% sensitivity, 77.7% ± 27.3% specificity and an AUC of 0.85. Conclusion EEG beta-band PSE in the central-parietal region is predictive of the effectiveness of drug treatment on HZ patients, and it could potentially be used for early pain management and therapeutic prognosis.