Our study aimed to investigate the association between shift work and stroke and determine whether this association varies depending on the presence of insomnia. Utilizing the KoGES prospective cohort data, our primary exposure variables were shift work and insomnia. The occurrence of stroke was the main outcome of interest. Hazards ratios and 95% confidence intervals were estimated using Cox regression analysis. An interaction analysis was conducted to assess the interaction of shift work and insomnia on stroke incidence. In the interaction analysis, shift work was significantly associated with stroke incidence only in groups with insomnia and a hazards ratio of 2.49 (95% confidence interval, 1.02-6.11). Our study demonstrated that shift work was associated with a higher risk of stroke among the population with insomnia.