• • Bifunctional cellulose-based membrane was prepared by Schiff base reaction and physical cross-linking assembly. • • A novel stacking strategy was proposed to achieve efficient solar seawater desalination and wastewater purification. • • Oil-in-water and water-in-oil emulsions could be efficiently separated by means of composite membranes. • • The integrated device achieved the simultaneous removal of oil and ions from oily seawater. Simultaneous removal of oil and ions from complex oily seawater to produce fresh water remains a serious challenge, and more effective and sustainable alternatives need to be developed. Here, by adjusting the components of dialdehyde microcrystalline cellulose (DAC) and amino modified multi-walled carbon nanotubes (CNTs), a bifunctional composite membrane (CNT@DAC) enabling solar-driven desalination and emulsion filtrating separation was prepared. CNTs cross-linked on the DAC membrane through Schiff base reaction and vacuum-assisted filtration had excellent light-harvesting effects, and could provide a superior light absorption of up to 97% in the full solar spectrum. And a new stacking strategy was proposed to build 2D water path and reduce heat loss, so that the solar-driven evaporation efficiency of the CNT@DAC membrane could reach 90.86% under 1.0 sun. Noteworthily, the CNT@DAC membrane with underwater superoleophobic and underoil superhydrophobic achieved on-demand efficient separation of oil-in-water and water-in-oil emulsions. With the help of this bifunctional membrane, the integrated purification of oily seawater was realized, thereby obtaining clean water resources that meet drinking water standards. We believe that this research represents an avenue for boosting the combination of solar-driven water evaporation and superwetting systems into practical applications, and will attribute to solve the water and energy crisis.