The aim of this study was to evaluate whether patients with a non-specific back pain disorder are more likely to be diagnosed with a psychiatric disorder than patients with a specific back pain disorder (such as a herniated disc or inflammatory back disorder). This was a retrospective cohort study using Danish registries. Our study population included 24,518 patients younger than 61 years and 12,274 patients older than 61 years. In both subpopulations, 60% had a non-specific back pain diagnosis (BPD). In the younger subpopulation, 2.1% of the patients with a non-specific BPD and 1.3% of the patients with a specific BPD had a psychiatric diagnosis within one year of their BPD. In the older subpopulation, 0.6% of patients had a psychiatric diagnosis in both BPD groups. The most frequent psychiatric diagnoses were stress-related disorders. In the younger subpopulation, patients with non-specific back pain had a higher risk of being diagnosed with a psychiatric disorder than patients with specific back pain (adjusted odds ratio 1.56, 95% confidence interval 1.25-1.94). The type of BPD had no effect on the risk of having a psychiatric diagnosis among older patients.