Objective This cohort study was to assess the association between serum calcium levels and the risk of acute kidney injury (AKI) in acute myocardial infarction (AMI) patients. Methods This study was analyzed using data of 1286 AMI patients aged ≥18 years who stayed in ICU more than 24 h in Medical Information Mart for Intensive Care IV (MIMIC-IV) database. Univariable logistic regression model was established to identify potential covariates. Univariate and multivariable logistic regression models were used to analyze the association between serum calcium and the risk of AKI in patients with AMI. The association between serum calcium and the risk of AKI in patients with AMI was also shown by restricted cubic spline (RCS) plot. Odds ratio (OR) and 95% confidence interval (CI) were calculated. Results The median follow-up time was 1.61 (1.23, 2.30) days, and 436 (33.90%) participants had AKI at the end of follow-up. After adjusting for covariates, elevated level of serum calcium level was related to reduced risk of AKI in AMI patients (OR = 0.88, 95%CI: 0.80–0.98). Decreased risk of AKI was found in AMI patients with serum calcium level of 8.40–8.90 mg/dL (OR = 0.54, 95%CI: 0.34–0.86) or ≥8.90 mg/dL (OR = 0.60, 95%CI: 0.37–0.99). The RCS plot depicted that serum calcium level was negatively correlated with the risk of AKI in patients with AMI. Conclusions AMI patients with AKI had lower serum calcium levels compared with those without AKI. Increased serum calcium level was associated with decreased risk of AKI in patients with AMI.