This study aims to determine whether CYP2C19 loss‐of‐function (LoF) variants were associated with long‐term ischemic stroke risk in Chinese primary care patients treated with clopidogrel. Patients treated with clopidogrel were ascertained from Chinese electronic medical records linked with a biobank for a retrospective cohort study. Their medical information was examined for the period from January 2018 to December 2021. Two CYP2C19 major loss of function variants (*2:rs4244285 and *3: rs4986893) were genotyped. The clinical outcome was ischemic stroke event. Cox regression analysis was used to evaluate the association between the occurrence of ischemic stroke events and CYP2C19 LoF variants. Covariates included age, gender, body mass index, prior ischemic stroke, transient ischemic attack, hypertension, diabetes mellitus, hyperlipoidemia, smoke status, aspirin use, proton‐pump inhibitor use, and statin use. Of the 1,141 patients included in the clopidogrel therapy cohort, 61.9% carried at least one CYP2C19 LoF variant. During a median follow‐up period of 12 months, 103 patients (9.0%) had an ischemic stroke. After adjusting for other risk factors, carriers of CYP2C19 LoF variants had significantly higher risk of ischemic stroke compared with non‐carriers (hazard ratio: 1.64, 95% confidence interval: 1.06–2.53, P = 0.025). This pharmacogenetic study of clopidogrel provides novel insights into the association between the CYP2C19 LoF variant and long‐term stroke risk. We established that there is still a need for CYP2C19 genotype‐guided personalized antiplatelet therapy in those who have returned to the primary care setting for clopidogrel prescription.