Lipids and lipid ratios have been proven to be associated with cardiovascular disease; however, their relationships with stroke and stroke subtypes had not been fully understood. This study aims to assess the associations of lipids and lipid ratios with type‐specific stroke and compare their predictive capacities for stroke occurrence. In this prospective cohort study, a total of 42 005 Chinese participants aged 20 to 80 who were free of stroke at baseline were included and selected into subgroups of stroke subtypes (ischemic, hemorrhagic, and total). Total stroke outcome included a combination of ischemic and hemorrhagic stroke. Over an average follow‐up of 3.6 years, 781 participants developed stroke (623 ischemic and 158 hemorrhagic). In men, the highest TC/HDL‐C quartile was significantly associated with increased ischemic stroke risk (multivariable‐adjusted hazard ratio [HR], 1.52, 95% confidence interval [CI], 1.14‐2.03) and total stroke risk (HR, 1.45, 95% CI, 1.12‐1.87), and TC/HDL‐C had the highest area under the receiver operating characteristic curve (AUC) for predicting ischemic (AUC, 0.868) and total stroke (AUC, 0.874). In women, the highest TG quartile was significantly associated with increased risk of ischemic (HR, 1.99, 95% CI, 1.11‐3.59) and total stroke (HR, 1.85, 95% CI, 1.07‐3.20), with AUCs of 0.850 and 0.861, respectively. No lipid variables were significantly associated with hemorrhagic stroke in both sex. In conclusion, TC/HDL‐C ratio may better predict stroke risk in men, whereas TG was more valuable in predicting stroke risk in women. TC/HDL‐C and TG may help to discriminate high stroke risk individuals and serve as potential targets for stroke prevention.