Abstract Background Exposures to lower air temperature and cold spells have been associated with an increased risk of various diseases. However, the short-term effect of lower air temperature and cold spells on myocardial infarction (MI) remains incompletely understood. Purpose We aimed to evaluate the short-term effects of lower air temperature and cold spells on MI hospital admissions within the nationwide SWEDEHEART registry. Methods This population-based nationwide study included 120,380 MI cases admitted to hospitals in Sweden during the cold season (October to March) from 2005 to 2019. Daily mean air temperature was estimated at 1 km2 spatial resolution across Sweden using a three-stage machine learning approach and percentiles of daily temperatures experienced by individuals in the same municipality were employed as individual exposure indicators to account for potential geographic adaptation. Cold spells were defined as periods of at least two consecutive days with a daily mean temperature below the 10th percentile of the temperature distribution for each municipality. A time-stratified case-crossover design incorporating a conditional logistic regression model with distributed lag non-linear model using lag 0-1 and lag 2-6 days was employed to evaluate the short-term effects of lower air temperature and cold spells on total MI, non-ST-segment elevation MI (NSTEMI) and ST-segment elevation MI (STEMI). Results We found significant increases in risk for total MI, NSTEMI, and STEMI in association with a decrease of one percentile in temperature at a lag of 2-6 days, indicated by ORs (95% CI) of 1.099 (1.057-1.142), 1.110 (1.06-1.164), and 1.076 (1.004-1.153), respectively. Additionally, we found that cold spells were significantly associated with increased risks for total MI, NSTEMI, and STEMI at a lag of 2-6 days, with ORs (95% CI) of 1.077 (1.037-1.12), 1.069 (1.02-1.119), and 1.095 (1.023-1.172), respectively. Moreover, independent effects of lower air temperature and cold spells on MI occurrence were found after adjusting for each other. Conversely, we observed that lower air temperature and cold spells were associated with decreased risks for MI at a lag of 0-1 days. Conclusions This nationwide case-crossover study demonstrated a novel biphasic pattern in MI risk following exposure to lower air temperatures and cold spells, characterized by an initial transient reduction in risk at lags 0-1 day, followed by a significant increase in risk at lags 2-6 days. As climate change continues to induce complex shifts in regional weather patterns, enhancing protections to reduce future cold-related cardiac hospitalizations is crucial.