ObjectivesThe risk of adverse events and prognostic factors are changing in different time phases after acute myocardial infarction (AMI). The incidence of adverse events is considerable in the early period after AMI hospitalisation. Therefore, dynamic risk prediction is needed to guide postdischarge management of AMI. This study aimed to develop a dynamic risk prediction instrument for patients following AMI.DesignA retrospective analysis of a prospective cohort.Setting108 hospitals in China.ParticipantsA total of 23 887 patients after AMI in the China Acute Myocardial Infarction Registry were included in this analysis.Primary outcome measuresAll-cause mortality.ResultsIn multivariable analyses, age, prior stroke, heart rate, Killip class, left ventricular ejection fraction (LVEF), in-hospital percutaneous coronary intervention (PCI), recurrent myocardial ischaemia, recurrent myocardial infarction, heart failure (HF) during hospitalisation, antiplatelet therapy and statins at discharge were independently associated with 30-day mortality. Variables related to mortality between 30 days and 2 years included age, prior renal dysfunction, history of HF, AMI classification, heart rate, Killip class, haemoglobin, LVEF, in-hospital PCI, HF during hospitalisation, HF worsening within 30 days after discharge, antiplatelet therapy, β blocker and statin use within 30 days after discharge. The inclusion of adverse events and medications significantly improved the predictive performance of models without these indexes (likelihood ratio test p<0.0001). These two sets of predictors were used to establish dynamic prognostic nomograms for predicting mortality in patients with AMI. The C indexes of 30-day and 2-year prognostic nomograms were 0.85 (95% CI 0.83–0.88) and 0.83 (95% CI 0.81–0.84) in derivation cohort, and 0.79 (95% CI 0.71–0.86) and 0.81 (95% CI 0.79–0.84) in validation cohort, with satisfactory calibration.ConclusionsWe established dynamic risk prediction models incorporating adverse event and medications. The nomograms may be useful instruments to help prospective risk assessment and management of AMI.Trial registration numberNCT01874691.