A polymeric ionic liquid (PIL), with quaternary ammonium ions attached to the polymer matrix, displays CO2 affinity controlled by moisture. This finding led to the development of moisture swing absorption (MSA) for direct air capture of CO2. This work aims to elucidate the role of water in MSA. For some humidity range, CO2 absorption is an endothermic process associated with concurrent dehydration of the sorbent. The thermodynamic behavior of water indicates a decreased hydrophilicity of the PIL as the mobile anion transforms from CO32- to HCO3- during CO2 absorption. The decrease in hydrophilicity drives water out of the PIL, carrying heat away. The mechanism is elucidated by molecular modeling based on density functional theory. The finding of spontaneous cooling during absorption and its mechanism in the PIL opens new possibilities for designing an air capture sorbent with a strong CO2 affinity but low absorption heat.