Clinical practice guidelines recommend maintaining serum potassium levels between 4.0 and 5.0 mEq/L in patients with acute myocardial infarction (AMI). These guidelines are based on small studies that associated low potassium levels with ventricular arrhythmias in the pre-β-blocker and prereperfusion era. Current studies examining the relationship between potassium levels and mortality in AMI patients are lacking. To determine the relationship between serum potassium levels and in-hospital mortality in AMI patients in the era of β-blocker and reperfusion therapy. Retrospective cohort study using the Cerner Health Facts database, which included 38,689 patients with biomarker-confirmed AMI, admitted to 67 US hospitals between January 1, 2000, and December 31, 2008. All patients had in-hospital serum potassium measurements and were categorized by mean postadmission serum potassium level (<3.0, 3.0-<3.5, 3.5-<4.0, 4.0-<4.5, 4.5-<5.0, 5.0-<5.5, and ≥5.5 mEq/L). Hierarchical logistic regression was used to determine the association between potassium levels and outcomes after adjusting for patient- and hospital-level factors. All-cause in-hospital mortality and the composite of ventricular fibrillation or cardiac arrest. There was a U-shaped relationship between mean postadmission serum potassium level and in-hospital mortality that persisted after multivariable adjustment. Compared with the reference group of 3.5 to less than 4.0 mEq/L (mortality rate, 4.8%; 95% CI, 4.4%-5.2%), mortality was comparable for mean postadmission potassium of 4.0 to less than 4.5 mEq/L (5.0%; 95% CI, 4.7%-5.3%), multivariable-adjusted odds ratio (OR), 1.19 (95% CI, 1.04-1.36). Mortality was twice as great for potassium of 4.5 to less than 5.0 mEq/L (10.0%; 95% CI, 9.1%-10.9%; multivariable-adjusted OR, 1.99; 95% CI, 1.68-2.36), and even greater for higher potassium strata. Similarly, mortality rates were higher for potassium levels of less than 3.5 mEq/L. In contrast, rates of ventricular fibrillation or cardiac arrest were higher only among patients with potassium levels of less than 3.0 mEq/L and at levels of 5.0 mEq/L or greater. Among inpatients with AMI, the lowest mortality was observed in those with postadmission serum potassium levels between 3.5 and <4.5 mEq/L compared with those who had higher or lower potassium levels.