Background: Proton pump inhibitors (PPIs) are widely used drugs for gastric-acid-related diseases, which may have an impact on the gut microbiome. We aimed to evaluate the associations of PPIs use with risks of cardiovascular disease (CVD) and all-cause mortality in patients with type 2 diabetes (T2D).Methods: We analysed the associations of PPIs use with risks of coronary artery disease (CAD), myocardial infarction (MI), heart failure (HF), stroke, and all-cause mortality in 19,229 adults with T2D using data from the UK Biobank study.Results: During a median follow-up of 10.9-11.2 years, we documented a total of 2,971 CAD, 1,827 MI, 1,192 HF, and 738 stroke cases, along with 2,297 total deaths. PPIs use was significantly associated with higher risks of CAD (HR, 1.27; 95% CI, 1.15-1.40), MI (HR, 1.34; 95% CI, 1.18-1.52), HF (HR, 1.35; 95% CI, 1.16-1.57) and all-cause mortality (HR, 1.30; 95% CI, 1.16-1.45). No significant association was observed between PPIs use and stroke (HR, 1.11; 95% CI, 0.90-1.36). The results were consistent in the subgroup analyses stratified by factors including indications of PPIs, anti-diabetic medication use, and antiplatelet drug use. Analyses in a 1:1 propensity score-matched cohort of PPIs users versus non-users yielded consistent results. Conclusion: Our data suggested that PPIs use was associated with higher risks of CVD events and mortality among patients with T2D. Prescription of PPIs among patients with T2D should be cautious, and monitoring of adverse cardiovascular events during PPIs therapy should be enhanced.