Heatwaves damage societies worldwide and are intensifying with global warming. Several mechanistic drivers of heatwaves, such as atmospheric blocking and soil moisture-atmosphere feedback, are well-known for their ability to raise surface air temperature. However, what limits the maximum surface air temperature in heatwaves remains unclear; this became evident during recent Northern Hemisphere heatwaves which achieved temperatures far beyond the upper tail of the observed statistical distribution. Here, we present evidence for the hypothesis that convective instability limits annual maximum surface air temperatures (TXx) over midlatitude land. We provide a theory for the corresponding upper bound of midlatitude temperatures, which accurately describes the observed relationship between temperatures at the surface and in the midtroposphere. We show that known heatwave drivers shift the position of the atmospheric state in the phase space described by the theory, changing its proximity to the upper bound. This theory suggests that the upper bound for midlatitude TXx should increase 1.9 times as fast as 500-hPa temperatures at the time and location of TXx occurrences. Using empirical 500-hPa warming, we project that the upper bound of TXx over Northern Hemisphere midlatitude land (40°N to 65°N) will increase about twice as fast as global mean surface air temperature, and TXx will increase faster than this bound over regions that dry on the hottest days.