Objective The aim of this study was to examine the association between musculoskeletal (MSK) pain, insomnia, anxiety and depressive symptoms in patients from general practice. Design This is a cross-sectional study. Setting This study was conducted in general practice in Denmark. Participants A consecutive sample of 390 general practice patients (aged 12 years or older) were included; 183 patients with MSK pain and 207 patients without MSK pain. To be included in the MSK pain group, participants with MSK pain were required to report MSK pain at least weekly during the preceding month, which had a negative impact on daily activities. Primary and secondary outcomes measures The primary outcome was insomnia evaluated by the Athens Insomnia Scale. The secondary outcomes were psychological symptoms assessed by the Hospital Anxiety and Depression Scale. Results Patients with MSK pain had a significantly higher prevalence of insomnia (difference 25.5%, p<0.0001), anxiety (difference 24.3%, p<0.0001) and depressive symptoms (difference 11%, p<0.0001) compared with patients without MSK pain. Furthermore, patients with MSK pain and comorbid insomnia had significantly higher levels of anxiety and symptoms of depression compared with patients with MSK pain without insomnia (p<0.0001). These relationships remained robust when controlling for age, sex and body mass index in linear regression. Conclusion One in two patients in general practice report MSK pain. Comorbid MSK pain and insomnia are common and are associated with a higher prevalence of anxiety and depression. This highlights the importance of establishing the presence of insomnia and affective disorders as potentially modifiable factors during treatment of MSK pain in general practice.