The search and the utilization of alternative water resources to produce freshwater are highly important to the water shortage, especially in arid and desert regions. In these areas, the surface soil moisture (SSM) can be a promising water source, whereas its extraction and following release remain challenging. In this study, a light‐responsive bilayered hydrogel (LRBH) is designed to produce freshwater from SSM, which is obtained by the copolymerization of N‐isopropylacrylamide (NIPAM) and acrylic acid (AA) and in‐situ surface polymerization of polypyrrole (PPy). By careful optimization of the ratio of NIPAM and AA, the water absorption capacity of LRBH is significantly improved with the water absorption of 4.4 g/g even in the sandy soil with an extremely low water content (~3 wt%). The PPy in the top layer of the LRBH can absorb solar light to heat the hydrogel at daytime so that the temperature of the hydrogel can quickly rise above the lower critical solution temperature of LRBH. As a result, the freshwater is quickly expelled from the LRBH. Under simulated solar light irradiation, 68.6% of all absorbed water within LRBH can be released within 20 min. The current study provides an effective and facile strategy for SSM capture and suitable systems for the generation of freshwater in arid or desert regions.