Atmospheric muon neutrinos are produced by meson decays in cosmic-ray-induced air showers. The flux depends on meteorological quantities such as the air temperature, which affects the density of air. Competition between decay and re-interaction of those mesons in the first particle production generations gives rise to a higher neutrino flux when the air density in the stratosphere is lower, corresponding to a higher temperature. A measurement of a temperature dependence of the atmospheric νμ flux provides a novel method for constraining hadronic interaction models of air showers. It is particularly sensitive to the production of kaons. Studying this temperature dependence for the first time requires a large sample of high-energy neutrinos as well as a detailed understanding of atmospheric properties. We report the significant (>10σ) observation of a correlation between the rate of more than 260,000 neutrinos, detected by IceCube between 2012 and 2018, and atmospheric temperatures of the stratosphere, measured by the Atmospheric Infrared Sounder (AIRS) instrument aboard NASA’s AQUA satellite. For the observed 10 % seasonal change of effective atmospheric temperature we measure a 3.5(3) % change in the muon neutrino flux. This observed correlation deviates by about 2-3 standard deviations from the expected correlation of 4.3 % as obtained from theoretical predictions under the assumption of various hadronic interaction models.