This study aimed to investigate the relationship between sleep duration (SD) and stroke, and examine the effects of SD on stroke with or without metabolic syndrome (Mets) and its components among the adult residents in Shanghai, China. A total of 20,245 participants (51.72% male, mean age 44.66 years) were included from Shanghai Chronic Disease and Risk Factors Surveillance (SCDRFS) in 2017. The weighted logistic regressions were performed to examine the associations between SD and stroke in different status of Mets and its components. The mean SD was 7.51±0.03 h/d. After adjusting for all the potential factors, SD<6 h/d (OR=1.73, 95% CI: 1.35-2.20) or ≥10 h/d (OR=1.66, 95% CI: 1.08-2.57) was significantly positively associated with stoke in the total participants; moreover, in the non-Mets group, only SD<6 h/d (OR=1.77, 95% CI: 1.19, 2.64) significantly increased the risk of stroke; while, in the Mets group, SD<6 h/d (OR=1.80, 95% CI:1.17-2.76) and ≥10 h/d (OR=1.97, 95% CI: 1.00-3.88) both had a positive significantly association with stoke. In addition, the effects of SD<6 h/d on stroke were more pronounced among those with high WC (OR=2.24, 95% CI: 1.40-3.58) and high TG (OR=2.60, 95% CI: 1.86-3.62), and the effects of SD≥10 h/d on stroke were more evident among those with high TG (OR=2.28, 95% CI: 1.02-5.08) and high FBG (OR=2.58, 95% CI: 1.30-5.10). Both short and long SD were significantly positively associated with stroke in the total participants, and the associations were stronger in the Mets group; conversely, in the non-Mets group, only short SD was significantly positively associated with stroke, and no significant association was observed between long SD and stroke. Therefore, more precise sleep measures may be needed to prevent stroke according to the different status of Mets.