Solar interfacial evaporation is the most promising route for desalination because it is highly efficient, affordable and offers green energy. Polyurethane foam (PUF) is an ideal substrate material for efficient solar water evaporation because of its low thermal conductivity, affordability, and high efficiency for continuous water transport. However, PUF exhibits poor mechanical properties after water absorption and expansion, and lacks the photothermal conversion effect. In this study, biorefinery lignin with efficient photothermal properties was introduced to prepare functional lignin-based PUF (LPUF), and the relationship between the molecular structure of fractioned lignin and the solar water evaporation performance was systematically investigated. The addition of lignin effectively enhanced the mechanical properties of LPUF after water absorption and swelling, and imparted the foam with a photothermal conversion effect. The water evaporation rate of LPUF was as high as 2.58 kg m −2 h −1 and could be further improved to more than 3.0 kg m −2 h −1 after loading polyaniline (PANI) on the surface of LPUF. LPUF−PANI exerted an excellent purification effect on dye wastewater with outstanding long-term stability, providing a potential solution for ecofriendly and sustainable economic production of fresh water. This study broadens the effective utilization of LPUF bulk materials in the fields of energy and environment.