Exposure to high and low ambient temperatures increases the risk of neonatal mortality, but the contribution of climate change to temperature-related neonatal deaths is unknown. We use Demographic and Health Survey (DHS) data (n = 40,073) from 29 low- and middle-income countries to estimate the temperature-related burden of neonatal deaths between 2001 and 2019 that is attributable to climate change. We find that across all countries, 4.3% of neonatal deaths were associated with non-optimal temperatures. Climate change was responsible for 32% (range: 19-79%) of heat-related neonatal deaths, while reducing the respective cold-related burden by 30% (range: 10-63%). Climate change has impacted temperature-related neonatal deaths in all study countries, with most pronounced climate-induced losses from increased heat and gains from decreased cold observed in countries in sub-Saharan Africa. Future increases in global mean temperatures are expected to exacerbate the heat-related burden, which calls for ambitious mitigation and adaptation measures to safeguard the health of newborns.