Utilizing hygroscopic materials for water sorption and desorption from the atmosphere involves the capture, storage, and release of both water and heat. Herein, we introduce a design framework tailored for salt-embedded composite hygroscopic gels and analyze the mass-energy flow during sorption-desorption processes. Through this framework, we develop a hygroscopic gel composed of zwitterionic and nonionic chains, which exhibits a controlled salting-in effect, leading to stable salt retention, high energy density, and water sorption capacity. When integrated into a multifunctional device with three distinct flow paths, it achieves an impressive thermal storage energy density of 7779.6 kJ<middle dot>kg(gel)(-1), with a temperature increase ranging from 3.6-13 degrees C during heat release, and efficient heat storage within 90 min under mild heating at 61 degrees C. In water harvesting mode, the device yields a liquid water productivity of 0.97 kg(water)<middle dot>kg(gel)(-1). This research highlights the potential of atmospheric water sorption for simultaneous thermal energy storage and water generation.