Background Understanding the relationship between chronic pain conditions and suicidal behavior—suicide attempt, other intentional self-harm, and death by suicide—is imperative for suicide prevention efforts. Although chronic pain conditions are associated with suicidal behaviors, these associations might be attributed to unmeasured confounding or mediated via pain comorbidity. Methods We linked a population-based Swedish twin study (N=17,148 twins) with 10 years of longitudinal, nationwide records of suicidal behavior from health and mortality registers through 2016. To investigate whether pain comorbidity versus specific pain conditions were more important for later suicidal behavior, we modeled a general factor of pain and two independent specific pain factors (measuring pain-related somatic symptoms and neck-shoulder pain, respectively) based on 9 self-reported chronic pain conditions. To examine whether the pain-suicidal behavior associations were attributable to familial confounding, we applied a co-twin control model. Results Individuals scoring one standard deviation above the mean on the general pain factor had a 51% higher risk of experiencing suicidal behavior (odds ratio (OR), 1.51; 95% confidence interval (CI), 1.34–1.72). The specific factor of somatic pain was also associated with increased risk for suicidal behavior (OR, 1.80; 95% CI, 1.45–2.22]). However, after adjustment for familial confounding, the associations were greatly attenuated and not statistically significant within monozygotic twin pairs (general pain factor OR, 0.89; 95% CI, 0.59–1.33; somatic pain factor OR, 1.02; 95% CI, 0.49–2.11) Conclusion Clinicians might benefit from measuring not only specific types of pain, but also pain comorbidity; however, treating pain might not necessarily reduce future suicidal behavior, as the associations appeared attributable to familial confounding.