On a molecular level, two autoimmune diseases: ulcerative colitis (UC) and dermatomyositis share common genetic determinants. On a clinical level, case reports evidenced the co-occurrence of these two diseases. We therefore hypothesize that UC is potentially associated with increased cumulative incidence of dermatomyositis. The goals of this retrospective cohort study were to evaluate whether UC is associated with increased cumulative incidence of dermatomyositis independent of sex and age. For comparison, we also assessed the cumulative incidence of polymyositis in UC and control subjects. The study enrolled 3,133 UC subjects and 14,726 control subjects. The cumulative incidence of dermatomyositis was significantly higher in UC than that of control subjects (p = 0.026), but the cumulative incidence of polymyositis was comparable between UC and control subjects (p = 0.596). UC was independently associated with the increased incident dermatomyositis (hazard ratio: 6.19, 95% confidence interval = 1.77–21.59, p = 0.004) after adjusting for sex, age, and concomitant rheumatoid arthritis, systemic lupus erythematosus, and systemic sclerosis. Similar trends of increased dermatomyositis in UC were observed when patients were stratified based on sex and age. In conclusion, our findings suggest that UC is probably associated with increased cumulative incidence of dermatomyositis, independent of sex, age, and concomitant autoimmune diseases.