Abstract Background Previous studies regarding the cardioprotective effects of dipeptidyl peptidase 4 (DPP-4) inhibitors have not provided sufficient evidence of a relationship between DPP-4 inhibition and actual cardiovascular outcomes. This study aimed to evaluate the impact of DPP-4 inhibitors on the survival of diabetic patients after first acute myocardial infarction (AMI). Methods This was a nationwide, propensity score-matched, case–control study of 186,112 first AMI patients, 72,924 of whom had diabetes. A propensity score, one-to-one matching technique was used to match 2672 controls to 2672 patients in the DPP-4 inhibitor group for analysis. Controls were matched based on gender, age, and a history of hypertension, dyslipidemia, diabetes, peripheral vascular disease, heart failure, cerebrovascular accident, end-stage renal disease, chronic obstructive pulmonary disease, and percutaneous coronary intervention. Results DPP-4 inhibitors improve the overall 3-year survival rate (log rank P