This work aimed to investigate the brain resting-state functional magnetic resonance imaging (fMRI) technology based on the depth autoencoders algorithm and to evaluate the clinically curative effect of pregabalin in the treatment of postherpetic neuralgia (PHN). In this study, 40 patients with PHN were selected and rolled randomly into a treatment group and a control group (20 cases in each group). Then, a depth autoencoders algorithm was constructed and applied in the brain resting-state fMRI technology. The brains of 40 patients with PHN treated with pregabalin were scanned, and the time curve extracted from MRI images was convolved by linear drift removal bandpass filtering to reduce low-frequency drift and high-frequency noise, so the low-frequency amplitude was calculated. Based on the low-frequency amplitude method, the calculated low-frequency signal energy was eventually divided by the total power of the entire frequency band to obtain the low-frequency amplitude rate value. The amplitude of low-frequency fluctuation (ALFF) and fractional ALFF (f-ALFF) before and after treatment were compared between the treatment group and the control group, and the visual analog scale (VAS) after treatment was also observed. After 4 weeks of taking the drug, the VAS scores of patients from the treatment group in the first week (6.5 ± 0.8 points), the second week (6.5 ± 0.8 points), the third week (3.1 ± 0.3 points), and the fourth week (2.3 ± 0.4 points) after treatment were lower steeply than the scores before treatment (8.3 ± 1.1 points) (P < 0.05). Resting-state fMRI images showed that the f-ALFF of the 4 brain areas in the treatment group was higher than that of the control group, mainly including the bilateral frontal lobes, bilateral parietal lobes, left parietal lobes, and right posterior cerebellar lobes. Besides, the f-ALFF of the 6 brain areas in the treatment group was lower than that of the control group, mainly including the right frontal lobe, right parietal lobe, right middle frontal gyrus, precuneus, left frontal lobe, and superior frontal gyrus. In conclusion, the resting-state fMRI technology based on the depth autoencoders algorithm could efficiently display the brain area characteristic changes of patients with PHN before and after treatment, thereby providing a reference for the diagnosis of the patient's condition.