Background: Shingles can cause long-term pain and negative emotions, along with changes in brain function. In this study, Granger Causality Analysis (GCA) was used to compare herpes zoster (HZ) and postherpetic neuralgia (PHN) differences in effective connections within the “pain matrix” between patients and healthy controls to further understand patterns of interaction between brain regions and explore the relationship between changes in effective connections and clinical features. Methods: Resting-state functional magnetic resonance imaging (fMRI) scans were performed on 55 HZ; 55 PHN; and 50 age-, sex- matched healthy controls (HCs). The brain regions associated with the pain matrix are used as the seeds of effective connectivity. GCA was used to analyze effective connections in brain regions that differed significantly between groups. Then the correlation between GCA values and clinical indicators was studied. Results: Compared with HC, GCA values between the thalamus and the amygdala, between the thalamus and the precentral gyrus, from the thalamus to the postcentral gyrus, and from the parahippocampal gyrus to the amygdala, anterior cingulate gyrus were significantly reduced in HZ patients. Compared with HC, GCA values between the insular and the postcentral gyrus, from the insular to the inferior parietal lobe, and from the postcentral gyrus to the amygdala were significantly reduced in PHN patients. Compared with HZ, GCA values between the inferior parietal lobe and the parahippocampal gyrus, between the inferior parietal lobe and the anterior cingulate gyrus, and from the anterior cingulate gyrus to the amygdala were significantly increased in PHN patients. The visual analogue scale (VAS) score of PHN patients was positively correlated with the GCA value from the central posterior lobe to the insula. Conclusions: PHN and HZ patients showed a broad reduction in effective connections, mainly reflected in abnormal pain pathway regulation, pain perception, negative emotion and memory production, providing new perspectives to understand the neuroimaging mechanisms of shingles.