The escalating scarcity of freshwater resources presents significant challenges to global sustainability, demanding innovative solutions by integrating cutting-edge materials and technologies. Here we introduce an autonomous artificial forest (3D AF) for continuous freshwater acquisition. This system features a three-dimensional (3D) architecture incorporating a carbon nanofiber (CNF) network and MXene@polypyrrole (Ti3C2@PPy), enhancing surface area, light absorption, heat distribution, and surface wettability to improve solar vapor generation and fog collection efficiency. The autonomous operation is facilitated by an integrated photothermal actuator that adjusts to the day and night conditions. During daylight, the 3D AF tilts downward to maximize solar exposure for water evaporation, while at night, it self-adjusts to optimize fog particle collection. Notably, our device demonstrates the ability to harvest over 5.5 L m−2 of freshwater daily outdoors. This study showcases the potential of integrating advanced materials and technologies to address pressing global freshwater challenges, paving the way for future innovations in water harvesting.