Background: Chronic pain affects one fifth of American adults, contributing significant public health burden. Chronic pain mechanisms can be further understood through investigating brain gene expression. Methods: We tested differentially expressed genes (DEGs) in chronic pain, migraine, lifetime fentanyl and oxymorphone use, and with chronic pain genetic risk in four brain regions (dACC, DLPFC, MeA, BLA) and imputed cell type expression data from 304 postmortem donors. We compared findings across traits and with independent transcriptomics resources, and performed gene-set enrichment. Results: We identified two chronic pain DEGs: B4GALT and VEGFB in bulk dACC. We found over 2000 (primarily BLA microglia) chronic pain cell type DEGs. Findings were enriched for mouse microglia pain genes, and for hypoxia and immune response. Cross-trait DEG overlap was minimal. Conclusions: Chronic pain-associated gene expression is heterogeneous across cell type, largely distinct from that in pain-related traits, and shows BLA microglia are a key cell type.