Introduction Suicidality in obsessive-compulsive disorder (OCD) is underestimated and it is important for clinicians to understand the factors that contribute to suicidal ideation. The present study aimed to estimate a network of the core clinical symptoms of OCD including obsessions, compulsions, and obsessive–compulsive (OC) symptom dimensions, depressive symptoms, and psychological traits, and to examine which symptoms contribute to suicidal ideation in patients with a primary diagnosis of obsessive–compulsive disorder. Methods A total of 444 patients with OCD were assessed with the Yale–Brown Obsessive-Compulsive Scale, the Montgomery–Asberg Depression Rating Scale, and various other measures. Network analysis was conducted to estimate the network of obsessive–compulsive and depressive symptoms, psychological traits including alexithymia and impulsivity, and demographic covariates. Symptoms directly related to suicidal ideation in the network were examined for their relative contribution to suicidal ideation. Results Suicidal ideation was directly related to degree of control over compulsive behaviors, distress associated with compulsive behaviors, time spent performing compulsive behaviors, and unacceptable thoughts, along with depressive symptoms and alexithymia. In the network of OC and depressive symptoms the most central symptoms among the former were interference due to compulsive behaviors and interference due to obsessive thoughts, and among the latter were pessimistic thoughts and reported sadness. Conclusion The findings suggest that along with depressive symptoms and alexithymia, compulsions and unacceptable thoughts dimension may contribute to suicidality, and thus, should be carefully monitored in patients with OCD.