Background: This longitudinal study aimed to analyze the incidence of mental disorders in cancer survivors using claims data in South Korea. Methods: We confirmed the presence of mental disorders in a nationwide cohort of 555,776 patients diagnosed with stomach, breast, colorectal, or prostate cancer between January 1, 2010 and December 31, 2016. We analyzed the incidence of mental disorders based on age and time of diagnosis. Results: Analysis of the data revealed 36,526 (6.5%) cancer survivors were diagnosed with a mental disorder 1 year prior to cancer diagnosis. Of these patients with mental disorders, 16,035 were diagnosed with anxiety (43.9%), 13,848 with depression (37.9%), 3,998 with stress reaction/adjustment disorders (10.9%), and 2,645 (7.2%) with substance abuse during their first visit. The incidence of depression was relatively high in the breast-cancer group and that of anxiety was high in the prostate-cancer group. The incidence of anxiety was high in females and that of substance abuse was high in males. Further, the incidence of depression was relatively high in the young age group and that of anxiety was high in the elderly group. The overall frequency of mental disorders peaked 2 months after cancer diagnosis. The highest rate of increase after diagnosis was noted among those with stress reaction/adjustment disorders. Conclusion: Mental disorders in cancer survivors showed different patterns of incidence depending on the nature of the disease, sex, age, and primary cancer. Considering individual factors, timely diagnosis and intervention for psychological distress may increase these patients’ quality of life.