The remediation of wastewater containing oily pollutants is imperative to mitigate the serious threats posed to the safety of fresh water, human well-being, and the environment. Current membrane separation technologies are severely restricted by their limitations for separating various types of oily pollutants with low sustainability. Herein, by imitating the plant transpiration in nature, we designed a solar-driven device composed of natural biomass sugar cane stem, chitosan/carboxymethyl cellulose, and graphite powders to separate versatile oily pollutants from the wastewater. Owing to its superior solar absorption capacity, microchannels for water transportation, and underwater oleophobicity, the resultant evaporator not only exhibited an excellent evaporation rate of 1.41 kg m-2 h-1 but also demonstrated an admirable purification efficiency of 99.9% for oily wastewater. Moreover, the device can maintain a stable evaporation rate and the original structure even in oily wastewater containing strong acid, alkali, or hypersaline components. Therefore, this work provides an effective approach to producing clean water from versatile wastewater.