The results of current prospective trials comparing the effectiveness of carotid endarterectomy (CEA) vs standard medical therapy for long-term stroke prevention in patients with asymptomatic carotid stenosis (ACS) will not be available for several years. In this study, we compared the observed effectiveness of CEA and standard medical therapy vs standard medical therapy alone to prevent ipsilateral stroke in a contemporary cohort of patients with ACS. This cohort study was conducted in a large integrated health system in adult subjects with 70% to 99% ACS (no neurologic symptom within 6 months) with no prior ipsilateral carotid artery intervention. Causal inference methods were used to emulate a conceptual randomized trial using data from January 1, 2008, through December 31, 2017, for comparing the event-free survival over 96 months between two treatment strategies: (1) CEA within 12 months from cohort entry vs (2) no CEA (standard medical therapy alone). To account for both baseline and time-dependent confounding, inverse probability weighting estimation was used to derive adjusted hazard ratios, and cumulative risk differences were assessed based on two logistic marginal structural models for counterfactual hazards. Propensity scores were data-adaptively estimated using super learning. The primary outcome was ipsilateral anterior ischemic stroke. The cohort included 3824 eligible patients with ACS (mean age: 73.7 years, 57.9% male, 12.3% active smokers), of whom 1467 underwent CEA in the first year, whereas 2297 never underwent CEA. The median follow-up was 68 months. A total of 1760 participants (46%) died, 445 (12%) were lost to follow-up, and 158 (4%) experienced ipsilateral stroke. The cumulative risk differences for each year of follow-up showed a protective effect of CEA starting in year 2 (risk difference = 1.1%, 95% confidence interval: 0.5%-1.6%) and persisting to year 8 (2.6%, 95% confidence interval: 0.3%-4.8%) compared with patients not receiving CEA. In this contemporary cohort study of patients with ACS using rigorous analytic methodology, CEA appears to have a small but statistically significant effect on stroke prevention out to 8 years. Further study is needed to appropriately select the subset of patients most likely to benefit from intervention.