Introduction

Chronic pain, defined as pain that persists or recurs for more than three months, affects over 30% of the global population. Its high prevalence has raised significant public health concerns due to its substantial impact on morbidity and healthcare costs [1, 2]. Cognitive impairment refers to a decline in cognitive functions, ranging from mild cognitive deficits to severe dementia, and poses a significant burden on individuals, families, and society at large [3]. Multiple studies have documented structural and functional alterations in the brains of individuals with chronic pain, including reduced cortical thickness across various regions, neuronal damage, and neuroinflammation. These findings have led to the hypothesis that chronic pain may be a potential risk factor for cognitive impairment [4, 5].

The relationship between chronic pain and cognitive impairment is complex and multifaceted. However, the existing literature presents inconsistent findings. While some studies suggest that individuals with chronic pain are at increased risk for cognitive impairment, others report no significant association. Clinically, it is estimated that approximately 20% of patients with chronic pain experience some form of cognitive impairment, with those reporting multisite pain showing a higher risk of dementia and more rapid cognitive decline [6]. Several large-scale longitudinal studies have reported associations between chronic pain and cognitive decline, as well as increased incidence of dementia [7,8,9]. Conversely, one prospective cohort study found no elevated risk of attention or executive function deficits in individuals with chronic pain, although high pain intensity was associated with an increased likelihood of memory impairment [10]. Moreover, a previous meta-analysis failed to demonstrate a significant association between chronic pain and cognitive impairment [11].

Importantly, a growing number of recent longitudinal studies with extended follow-up periods have been conducted to investigate this association, offering new insights into the potential long-term cognitive consequences of chronic pain [6, 12]. However, to date, no comprehensive meta-analysis has specifically addressed the relationship between chronic pain and cognitive impairment.

In this study, we conducted a systematic review and meta-analysis to evaluate the long-term association between chronic pain and cognitive impairment and to provide recommendations for future research that may inform intervention strategies.

Methods

Search strategy

This meta-analysis of observational studies was conducted in accordance with the Preferred Reporting Items for Systematic Reviews and Meta-Analyses (PRISMA) guidelines. The study protocol was registered with PROSPERO (CRD42024499515).

Relevant publications were identified through a comprehensive literature search of PubMed, Embase, and the Cochrane Library databases from their inception to October 1, 2023. An updated search was conducted on January 10, 2025. The search strategy included combinations of the following terms: (chronic pain OR widespread pain OR persistent pain) AND (cognition disorders OR cognitive decline OR cognitive impairment OR dementia) (see Table S1 for full search terms). No language restrictions were applied. In addition, reference lists of relevant review articles were manually screened, and citation tracking was performed for all included studies.

Study inclusion and exclusion criteria

Studies were included if they met the following criteria: (1) involved adult participants (aged ≥18 years); (2) evaluated the association between chronic pain and cognitive impairment; and (3) included a comparison group of healthy controls. Only original observational studies were considered for inclusion.

The following types of publications were excluded: cross-sectional studies, case reports, conference abstracts, and narrative reviews. Studies were also excluded if they did not report extractable data in the main text or lacked full-text availability.

Cognitive impairment was defined as either a diagnosis of incident dementia (binary outcome) or a measurable decline in cognitive performance (continuous outcome). Regarding pain assessment, studies were included if they evaluated any form of chronic or persistent pain, as determined by validated pain questionnaires, patients’ chief complaints, or clinical diagnoses recorded in hospital settings.

Data extraction

Two authors (DQ and XMW) independently screened the titles and abstracts of all retrieved studies to identify potentially eligible articles. Full-text versions of the shortlisted articles were then assessed independently using predefined inclusion and exclusion criteria. Any discrepancies were resolved through discussion and consensus, or by consulting a third reviewer (JJY).

Data were independently extracted by the same two coauthors using a standardized Microsoft Excel form. The following information was collected for each included study: publication year, geographic location, total sample size, study design, follow-up duration, mean age of participants, number of female participants, level of educational attainment, assessment of depressive symptoms, type of pain, pain evaluation scale used, cognitive assessment methods, baseline prevalence of cognitive impairment, incidence of cognitive impairment during follow-up, and details regarding adjustment for confounding variables.

For cognitive outcomes, data on incident dementia (binary outcome) and continuous measures of cognitive decline were extracted. In cases where data were missing or unclear, study authors were contacted directly, and supplementary data were retrieved from published study protocols where available.

We extracted odds ratios (ORs) from retrospective cohort studies with longitudinal follow-up. When a study assessed multisite chronic pain, the OR corresponding to single-site pain was extracted to avoid overestimating the association between chronic pain and cognitive impairment. If a global cognitive score was not reported, memory domain scores were extracted instead, given that memory impairment is the hallmark of most dementia syndromes, particularly Alzheimer’s disease.

Quality assessment and risk of bias

The quality and risk of bias of the included studies were independently assessed by two coauthors (XYL and ZBZ) using the Newcastle–Ottawa Scale (NOS) for Cohort Studies, as recommended by the Cochrane Collaboration for evaluating observational research. Any disagreements were resolved through discussion and consensus.

The NOS consists of eight items grouped into three domains: selection of study groups (four items), comparability of groups (one item), and assessment of outcomes (three items). Each item is scored using a star system, with a maximum of nine stars indicating the highest quality. Based on the total NOS score, studies were categorized as low quality (0–3 stars), moderate quality (4–6 stars), or high quality (7–9 stars).

Statistical analysis

Odds ratios (ORs) and 95% confidence intervals (CIs) were extracted from each study to estimate the risk of cognitive impairment associated with chronic pain. When the incidence of cognitive impairment was less than 10%, hazard ratios (HRs) and relative risks (RRs) were considered equivalent to ORs. For studies in which the incidence exceeded 10%, HRs and RRs were also interpreted as ORs; however, these studies were excluded from sensitivity analyses to avoid potential bias.

For studies reporting continuous cognitive outcomes, regression coefficients (β values) for global cognitive scores were extracted. These were then converted into ORs and 95% CIs using the method described by Kuiper et al. [13]. Heterogeneity among studies was assessed using the I² statistic. A fixed-effects model was used to compute pooled estimates when heterogeneity was low (P > 0.1 or I² < 50%). In cases of significant heterogeneity, a random-effects model was applied.

Subgroup analyses and mixed-effects meta-regression (with heterogeneity variance estimated using restricted maximum likelihood) were conducted to investigate potential sources of heterogeneity. Subgroup analyses were based on the following variables: (1) Pain type: headache vs. other pain types; (2) Follow-up duration: < 5 years vs. ≥ 5 years; (3) Cognitive outcome assessment: incident dementia vs. cognitive score; (4) Participant age: < 60 years vs. ≥ 60 years; (5) Study design: retrospective cohort vs. prospective cohort; (6) NOS quality score: moderate/low quality vs. high quality; (7) Adjustment of depression: adjusted vs. unadjusted. Meta-regression included four potential moderators: mean baseline age of participants, sample size, follow-up duration, and adjustment for depression. These moderators were selected based on clinically relevant factors likely to influence effect sizes and on data availability, ensuring both their validity and relevance.

Leave-one-out analysis (to assess robustness and identify influential studies) and analyses excluding high-bias studies (to further verify robustness) were conducted to evaluate the stability of pooled estimates. Funnel plot symmetry was examined to detect potential small-study effects. In addition, Begg’s and Egger’s tests were used to evaluate the presence of publication bias, with statistical significance defined as p < 0.1. All statistical analyses were conducted using R software (version 3.2.1).

Results

Study selection

The initial database search yielded 5762 articles. An additional seven relevant studies were identified through manual screening of review articles and the reference lists of included papers. After removing duplicates and excluding articles unrelated to the research question, 127 articles were selected for full-text review. Following a detailed evaluation, 99 studies were excluded, resulting in 28 studies that met the inclusion criteria for this meta-analysis [6, 8, 10, 12, 14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37]. The study selection process is summarized in the PRISMA flow diagram (Fig. 1).

Fig. 1
Fig. 1
Full size image

Selection of study.

Characteristics of included studies

The key characteristics of the 28 included studies are summarized in Table 1. Collectively, these studies involved 7,914,407 participants, with 656,723 in the chronic pain group and 7,257,684 in the control group. The mean age of participants ranged from 18 to 78 years. One study included only female participants [26].

Table 1 Baseline characteristics of the eligible studies.

All included studies were observational longitudinal in design, comprising 16 retrospective cohort studies and 12 prospective cohort studies. Geographically, the studies were conducted in China (n = 11), the United States (n = 6), France (n = 3), South Korea (n = 3), Norway (n = 2), and one study each from the United Kingdom, Japan, and Canada.

The overall baseline prevalence of chronic pain across the studies was approximately 9.0%. Most studies assessed pain using patient-reported questionnaires, such as the Medical Outcomes Study Short-Form (MOS-SF), or through direct questions, e.g., “Are you often troubled by pain?” or “Has the pain lasted for ≥ 3 months?” Eleven studies utilized validated diagnostic criteria, including the International Classification of Diseases (ICD-9/10). One study defined chronic pain based on the use of analgesic medications for at least 3 months.

Regarding pain types, 12 studies focused on headaches (including migraine and tension-type headache), six on general body pain, while the remaining studies included conditions such as fibromyalgia, trigeminal neuralgia, osteoarthritis, and unspecified chronic pain. Most studies defined chronic pain as pain lasting longer than 3 months; however, three studies using the MOS-SF defined it as pain persisting for more than 4 weeks, and another three described it as frequent or near-daily pain.

For cognitive outcomes, 20 studies assessed incident dementia, while eight evaluated cognitive decline based on cognitive performance scores. Among the latter, six studies used composite scores to assess global cognitive function, and two focused on specific cognitive domains, such as the Mini-Mental State Examination (MMSE). The mean follow-up duration across studies ranged from 2 to 15 years. Most studies adjusted for key confounders and reported adjusted hazard ratios (HRs) or relative risks (RRs).

Confounding adjustment

Of the 28 included studies, 27 reported adjusted effect estimates. Nearly all (27/28) adjusted for basic demographics (age, sex). Of these, 23 additionally adjusted for common comorbidities (e.g., hypertension, diabetes); 17 accounted for educational level; and 13 explicitly incorporated depressive symptoms (e.g., CES-D, HADS, or ICD diagnostic codes). Notably, only one study adjusted for opioid medication use. Other potential confounders—such as family income, lifestyle factors (smoking, alcohol use), and medications—were also considered in various studies (Table 2).

Table 2 Summary results of the eligible studies.

Quality assessment

Among the 28 cohort studies included in this meta-analysis, 10 studies (35.7%) were rated as moderate quality (NOS scores of 6–7), while 17 studies (60.7%) were classified as high quality (NOS scores of 8–9). Detailed results of the quality assessment are provided in Table S2.

Meta-analysis: the association between chronic pain and cognitive function

Of the included studies, eight reported no significant association between chronic pain and cognitive impairment, whereas 20 identified chronic pain as an independent risk factor for cognitive impairment during follow-up. Due to substantial heterogeneity among studies (I² = 98%), a random-effects model was employed for meta-analysis. The pooled adjusted OR was 1.29 (95% CI: 1.14–1.47), indicating that individuals with chronic pain had a significantly higher risk of developing cognitive impairment compared to those without chronic pain (Fig. 2).

Fig. 2
Fig. 2
Full size image

Forest plot showing the impact of chronic pain on cognitive function.

Subgroup and meta-regression analysis

The association between chronic pain and cognitive impairment was stronger in studies focusing on headache (OR = 1.42; 95% CI: 1.10–1.82) compared to other pain types (OR = 1.22; 95% CI: 1.06–1.41) (Fig. 3 and Figure S1). Follow-up duration also influenced the results: studies with ≥ 5 years of follow-up reported a stronger association (OR = 1.37; 95% CI: 1.15–1.63) than those with < 5 years (OR = 1.16; 95% CI: 1.03–1.31) (Fig. 3 and Figure S2). Participants aged ≥ 60 years showed a slightly higher risk (OR = 1.30; 95% CI: 1.06–1.59) compared to those under 60 (OR = 1.28; 95% CI: 1.15–1.43) (Fig. 3 and Figure S3). When stratified by study design, both retrospective (OR = 1.41; 95% CI: 1.17–1.69) and prospective cohort studies (OR = 1.13; 95% CI: 1.01–1.26) demonstrated a significant association (Fig. 3 and Figure S4). This association remained consistent regardless of study quality (high vs. moderate/low) (Fig. 3 and Figure S5). After adjusting for depression, the association between chronic pain and cognitive impairment persisted, although the odds ratio was significantly attenuated (Fig. 3 and Figure S7). When cognitive outcome type was considered, chronic pain was significantly associated with an increased risk of dementia (OR = 1.43; 95% CI: 1.23–1.65), whereas no significant association was found in studies using cognitive performance scores (OR = 0.99; 95% CI: 0.88–1.11) (Fig. 3 and S6). The meta-regression model quantified the contribution of covariates to the observed heterogeneity, showing that follow-up duration and adjustment for depression together explained 28.51% of the total heterogeneity, whereas age and sample size had no significant moderating effects (Table S3).

Fig. 3
Fig. 3
Full size image

Subgroup analyses of primary outcomes were conducted based on type of pain (headache vs. any kind of pain); length of follow-up (< 5 vs. ≥ 5 years); cognitive outcome assessment (incident dementia vs. cognitive score); participant age (< 60 vs. ≥ 60 years); study design (retrospective cohort vs. prospective cohort), NOS scores, and adjustment of depression (adjusted vs. unadjusted).

Sensitivity analysis and publication bias

Figure 4 shows the leave-one-out sensitivity analysis: sequential omission of each study yielded stable pooled ORs ranging from 1.25 to 1.31. To further verify robustness and probe sources of heterogeneity (original I² = 98%), we sequentially excluded studies contributing most to heterogeneity. After removing 5, 7, and 9 such studies, the I² declined from the original 98% to 81%, 65%, and 38%, respectively. Critically, the pooled OR remained statistically significant and stable across these exclusions (ranging from 1.29 to 1.22) (Figure S8-10). Together, these complementary analyses indicate that the association between chronic pain and elevated risk of cognitive impairment is robust and not driven by any single study or a subset of heterogeneous studies. Publication bias was assessed using funnel plots and Egger’s tests, showing no significant bias among included studies. Begg’s test (t = 0.14, P = 0.894) and Egger’s test (z = 1.34, P = 0.179) both supported this conclusion (Figure S11).

Fig. 4
Fig. 4
Full size image

The results of leave-one-out sensitivity analysis.

Discussion

This meta-analysis provides the most comprehensive synthesis to date of observational evidence on the long-term association between chronic pain and cognitive impairment. Across 28 cohort studies including more than 7.9 million participants, chronic pain was associated with a significantly increased risk of cognitive impairment, an effect driven primarily by dementia-related outcomes. The pooled adjusted OR of 1.30 reflects a modest but consistent elevation in risk, reinforcing the view that chronic pain is a systemic condition with meaningful neurological consequences.

These findings are supported by large-scale longitudinal studies: one study with a median follow-up of 8.6 years reported persistent pain linked to accelerated memory decline and higher dementia likelihood in older adults [8], while another involving 356,383 participants found more pain sites increased all-cause dementia risk over 13 years [12]. However, literature on this association remains inconsistent: a 24-year follow-up study reported no significant link between chronic pain and all-cause dementia [16], and a 4-year study in older adults found no association between pain and cognitive decline [22]. These discrepancies likely stem from variations in study design, population characteristics, follow-up duration, pain measurement tools, cognitive impairment diagnostic criteria, and comorbidity adjustment.

Pain intensity may further modify risk, yet only two studies examined dose–response relationships. Ezzati et al. [10] reported that each 1-point increase in pain was associated with a 24% higher risk of incident dementia (HR = 1.24; 95% CI: 1.03–1.49; p = 0.021), and Van der Leeuw et al. [19] found severe pain conferred greater memory-impairment risk than mild pain (HR = 3.47; 95% CI: 1.42–8.46; p = 0.006). Although limited, these data suggest higher pain intensity is linked to a greater likelihood of cognitive impairment. Future research should prioritize explicit dose–response analyses, rigorous confounder control (including depression and analgesic exposure), and standardized pain and cognitive assessments to clarify causality and inform targeted interventions for high-risk groups.

Persistent pain has long-term implications for cognitive function, and our subgroup analyses further supported this: studies involving older populations, longer follow-up durations, and headache-related pain consistently reported elevated risk, reinforcing our meta-analysis’ overall conclusion. This contrasts with a prior meta-analysis that found a pain-cognitive decline association only in shorter follow-ups (≤ 4.5 years) and no significant overall link [11]—a discrepancy likely due to the earlier study’s focus on older adults alone, whereas ours included a broader age range and more recent high-quality studies, adding new evidence to the field. Additionally, headache-related pain studies (vs. other chronic pain types) showed significantly higher cognitive impairment risk, which may relate to overlap between headache neural circuits (e.g., medial prefrontal cortex, anterior cingulate cortex, hippocampus) and cognitive-processing brain regions—structural/functional plasticity changes in these areas during recurrent/chronic headaches could disrupt cognition [38].

In our 12 headache-focused cohorts, 1 evaluated trigeminal neuralgia, 1 tension-type headache, 6 migraine, and 4 primary headache. Of the four primary headache studies, two reported increased all-cause dementia risk for both migraine and tension-type headache, whereas one found no significant association between migraine and cognitive function. Because few studies addressed non-migraine subtypes, we cannot determine whether the stronger association is subtype-specific—a key limitation of the current literature. Future work should classify headache by subtype and report subtype-specific cognitive outcomes to enable more granular meta-analyses and clarify differential risks.

The association between chronic pain and cognitive impairment was strong and statistically significant when dementia was the outcome (OR = 1.43; 95% CI: 1.23–1.65), but not when continuous cognitive performance scores were used (OR = 0.99; 95% CI: 0.88–1.11), partially consistent with prior reports [11, 12]. Two factors may explain this divergence. First, continuous tests (e.g., MMSE and domain-specific memory measures) are sensitive to mild, potentially reversible deficits and are analyzed with non-standardized criteria across studies, increasing heterogeneity and attenuating pooled effects. In contrast, dementia diagnoses (ICD codes or clinician assessment) follow standardized criteria, reducing measurement variability and yielding more consistent estimates of the pain–dementia association. Second, follow-up length differed: of eight studies using cognitive performance scores, five had <5 years of follow-up, limiting power to detect decline; among the 20 dementia-focused studies, 17 followed participants for ≥5 years, better capturing progressive impairment. Together, these patterns suggest differences in outcome sensitivity and raise the possibility that chronic pain contributes to neurodegenerative processes over time.

The link between chronic pain and cognitive impairment is likely multifactorial, spanning biological and psychological domains, with depressive symptoms especially salient given their ~30% prevalence among individuals with chronic pain [39]. Depression and cognitive impairment share mechanisms—including neuroinflammation, dysregulation of the hypothalamic–pituitary–adrenal axis, and impaired neuroplasticity [40]—and depression is frequently accompanied by cognitive decline and autonomic dysfunction, both established risk factors for Alzheimer’s disease [41, 42]. Accordingly, depression is both a key confounder and a potential mediator in the pain–cognition relationship: it may exacerbate cognitive dysfunction in those with chronic pain or independently contribute to decline. Yet only 13 of the included studies adjusted for depressive symptoms. Although the association between chronic pain and cognitive impairment persisted after this adjustment, the corresponding OR was substantially attenuated. Moreover, meta-regression indicated that adjustment for depression (together with follow-up duration) explained 28.51% of the total heterogeneity, implying that additional unmeasured factors likely contributed to between-study differences. Limited control for depression therefore leaves residual confounding, which could bias the estimated effect of chronic pain on cognition in either direction. Future studies should systematically account for depression and other psychosocial variables to isolate the independent impact of chronic pain; until then, these results should be interpreted cautiously in light of potential confounding and high heterogeneity.

From a clinical perspective, our findings suggest that chronic pain should be recognized as a potential long-term risk factor for cognitive impairment, particularly dementia, in older adults and in patients with persistent or headache-related pain. Clinicians managing chronic pain may therefore consider incorporating routine cognitive screening and longitudinal cognitive monitoring into standard care for high-risk patients. Given the substantial attenuation of effect estimates after adjustment for depression, systematic assessment and treatment of comorbid depressive symptoms should be prioritized as part of integrated pain management. Although causality cannot be inferred from observational data, a multidisciplinary approach combining effective pain control, mental health intervention, and cognitive surveillance may help mitigate downstream cognitive consequences while awaiting evidence from prospective interventional studies.

Preclinical studies consistently show that neuropathic pain impairs learning and memory [43, 44], yet the mechanisms linking chronic pain to cognitive deficits remain incompletely defined. Proposed pathways include chronic neuroinflammation; altered neuronal excitability; dysregulated synaptic plasticity; glial activation with downstream cytokine release; neurotransmitter and neurochemical imbalances; and disruptions of the gut–brain axis [38, 45]. Peripheral nociceptive input from tissue or nerve injury ascends via the spinal cord to the CNS, where it activates microglia and astrocytes in pain-processing regions [46]. This glia secretes pro-inflammatory cytokines—interleukin-1β (IL-1β), interleukin-6 (IL-6), and tumor necrosis factor-α (TNF-α) [47] —driving neuroinflammation that remodels synapses, inhibits long-term potentiation (LTP), and promotes excitotoxicity, thereby contributing to the comorbidity of chronic pain with neuropsychiatric disorders [44]. Notably, inhibiting microglial activation can reverse chronic pain–induced cognitive impairment [48]. Together, these processes suggest that chronic pain precipitates durable structural and functional changes in brain regions critical for cognition.

Clinical data align with these mechanisms. Chronic pain functions as a sustained stressor that dysregulates the HPA axis and elevates cortisol—changes linked to accelerated neurodegeneration [49]. Pain-related reductions in physical activity may further disrupt neurotransmitter balance, dampen neurotrophic support, and impair cerebrovascular health, all of which are critical for cognitive integrity [50]. Opioid analgesics, commonly used for moderate to severe chronic pain, add another layer: opioid exposure is associated with deficits in attention and memory, and opioid-induced CNS depression may partly account for cognitive impairments in long-term users [51]. Nevertheless, few studies in this meta-analysis characterized pain-management strategies or adjusted for the potential cognitive effects of opioids [52, 53]. Future work should disentangle the effects of chronic pain per se from those of opioid treatment and other behavioral or pharmacological interventions; careful adjustment for these factors will be essential to clarify the causal relationship between chronic pain and cognitive decline.

This study has several limitations. First, cognitive decline was assessed using disparate instruments without standardized criteria, likely introducing measurement bias and reducing cross-study comparability; moreover, incomplete exclusion of participants with baseline cognitive impairment may have confounded estimates of chronic pain’s independent effect on cognition. Second, our search strategy did not target specific cognitive domains, and only 2 of 8 included studies reported domain-stratified scores, limiting the feasibility of comprehensive domain-level subgroup analyses. Third, although higher pain intensity has been linked to greater risk of memory impairment, we could not stratify by pain severity because most studies did not report it consistently. Finally, substantial between-study heterogeneity persisted; despite subgroup analyses and meta-regression, only part of this variability was explained, suggesting residual heterogeneity from unmeasured factors. To clarify the relationship between chronic pain and cognitive outcomes, future work should employ unified assessment criteria for both cognition and pain and systematically adjust for key covariates, including comorbidities, medication use (e.g., opioids), and educational level.

In conclusion, chronic pain appears to be an independent risk factor for cognitive impairment, with the association most evident for dementia-related outcomes and particularly pronounced in older adults and in those with long-standing or multisite pain. These findings highlight the need for interdisciplinary care—integrating neurology, pain medicine, and mental health—to address the complex interplay between pain and cognition. Future research should delineate the biological pathways linking pain to cognitive decline and identify modifiable risk factors to guide targeted interventions and prevention in at-risk populations.