ImportanceIndividuals with type 2 diabetes (T2D) have high rates of mortality following myocardial infarction (MI). Hospitalization is an opportunity to initiate or continue evidence-based treatment to reduce risk in individuals with T2D and acute coronary syndrome (ACS).ObjectiveTo determine patterns of evidence-based medication use during the period of transition from admission to discharge after hospitalization for MI or coronary revascularization among individuals with T2D and ACS.Design, Setting, and ParticipantsThis retrospective cohort study used data from the Centers for Medicare & Medicaid Services (CMS) for January 1, 2018, to June 30, 2020. Medicare beneficiaries older than 18 years with T2D with a qualifying hospitalization were included. Individuals were followed before admission (90 days prior), at discharge (≤90 days), and after discharge (91-180 days after) from a hospitalization for MI or coronary revascularization. Data analysis was performed in June 2023.ExposuresDemographic data (race, sex, rural vs urban location of care, and comorbidities) were abstracted from CMS data using Master Beneficiary and Summary Files and International Statistical Classification of Diseases, Tenth Revision codes.Main Outcome and MeasuresMedicare Part D prescription fill records were examined for the following agents: (1) angiotensin-converting enzyme inhibitors (ACEIs), angiotensin receptor blockers (ARBs), or angiotensin receptor–neprilysin inhibitors (ARNIs); (2) β-blockers; (3) platelet adenosine diphosphate receptor inhibitors (P2Y12Is); (4) statins or proprotein convertase subtilisin/kexin type 9 inhibitors (PCSK9Is); and (5) glucagon-like peptide 1 receptor agonists (GLP-1RAs) or sodium glucose cotransporter 2 inhibitors (SGLT2Is). Logistic regression analysis was used to examine the association between covariates and lack of prescription fills in the postdischarge period.ResultsA total of 188 651 eligible Medicare beneficiaries with T2D and hospitalization for MI or coronary revascularization were identified. Their median age was 73.0 (IQR, 67.0-79.0) years, and more than half (111 982 [59.4%]) were men; 18 383 (9.7%) were Black and 153 461 (81.3%) were White. Not filling a cardiovascular medication after hospitalization was associated with not filling that medication at the time of discharge (adjusted risk ratio, 0.27 [95% CI, 0.27-0.28] for ACEIs, ARBs, or ARNIs; 0.24 [0.24-0.25] for β-blockers; 0.20 [0.19-0.20] for P2Y12Is; 0.31 [0.31-0.32] for statins or PCSK9Is; and 0.27 [0.26-0.28] for SGLT2Is or GLP-1RAs).Conclusions and RelevanceIn this cohort study of Medicare beneficiaries with T2D, longer-term medication use following hospitalization for MI was associated with medication use at the time of discharge. These findings highlight the critical importance of this period to optimize preventive care for these high-risk individuals. Further implementation science research is needed to develop strategies to improve use of these evidence-based medications.