The relationship between epilepsy and risk of acute myocardial infarction (AMI) is not fully understood. Evidence from the Stockholm Heart Study indicates that the risk of AMI is increased in people with epilepsy. This study aims to analyze the temporal trends in prevalence, adverse clinical outcomes, and risk factors of AMI in patients with epilepsy (PWE). Patients aged 18 years or older, diagnosed with epilepsy with or without AMI and hospitalized from January 1, 2008, to December 31, 2017, were identified from the National Inpatient Sample (NIS) database. The Cochran-Armitage trend test and logistic regressions were conducted using SAS 9.4. Odds ratios (ORs) were generated for multiple variables. A total of 8,456,098 inpatients were eligible for our analysis, including 181,826 comorbid with AMI (2.15%). The prevalence of AMI diagnosis in PWE significantly increased from 1,911.7 per 100,000 hospitalizations in 2008 to 2,529.5 per 100,000 hospitalizations in 2017 (Ptrend < 0.001). Inpatient mortality was significantly higher in epilepsy patients with AMI compared to those without AMI (OR = 4.61, 95% CI: 4.54 to 4.69). Factors significantly associated with AMI in PWE included age (≥75 years old vs. 18 ~ 44 years old, OR = 3.54, 95% CI: 3.45 to 3.62), atherosclerosis (OR = 4.44, 95% CI: 4.40 to 4.49), conduction disorders (OR = 2.21, 95% CI: 2.17 to 2.26), cardiomyopathy (OR = 2.11, 95% CI: 2.08 to 2.15), coagulopathy (OR = 1.52, 95% CI: 1.49 to 1.54), dyslipidemia (OR = 1.26, 95% CI: 1.24 to 1.27), peptic ulcer disease (OR = 1.23, 95% CI: 1.13 to 1.33), chronic kidney disease (OR = 1.23, 95% CI: 1.22 to 1.25), smoking (OR = 1.20, 95% CI: 1.18 to 1.21), and weight loss (OR = 1.20, 95% CI: 1.18 to 1.22). The prevalence of AMI in PWE increased during the decade. Mortality rates were high among this population, highlighting the need for comprehensive attention to prophylaxis for risk factors and early diagnosis of AMI in PWE by physicians.