Due to the population growth and environmental issues, the demand for clean water is still increasing. To address this problem, harvesting water from organic sewage by solar driven water evaporation is emerging as one of the most promising technologies with its attractive efficiency and negligible energy consumption. However, it still faces a typical defect as pollutants depositing on absorber, which usually limits the recyclability and causes a secondary pollution. In this work, we have provided a composite absorber by uniting carbon foam and nanostructured TiO2 for wastewater purification with dual function of solar steam generation and photocatalytic degradation. The composites selectively utilize the whole solar spectrum, in which low energy visible-near infrared (NIR) photons are transformed into heat by carbon foam, while high energy ultraviolet (UV) photon is converted into redox electron-hole pairs via TiO2. Besides, the combination of these two functional units reveals a synergistic incentive effect between photothermal and photocatalytic processes, based on the alleviated pollutant deposition and enhanced carrier separation. Under a simulated light of 1 kW m−2, the composite ultimately achieves a stable solar steam evaporation rate of 1.0334 kg m−2h−1, combining with a photocatalytic activity of degrading 87 % of MB after 2.5 h illumination.