AbstractThe utilization of nanochannel membranes for harvesting salinity gradient energy has shown promising potential in addressing the energy crisis and environmental pollution issues. While previous studies have mainly focused on extracting salinity energy from mixing artificial seawater with river water, the research introduces a creative approach involving dye wastewater treatment using MXene/TiO2 membranes to achieve simultaneous photocatalytic degradation and power generation via salinity gradients. The built‐in electric field generated by MXene/TiO2 heterojunctions enhances ionic transport and electron‐hole separation. After photocatalytic treatment of saline dye wastewater, the membrane is defined as a photodegradable membrane. This membrane exhibits increased surface charge and expanded layer spacing to optimize salinity gradient energy conversion efficiency, yielding an impressive power density of up to 11.78 W m−2, which is 20% higher than that of the original MXene/TiO2 membrane. This work offers valuable insights into the development of multifunctional materials for sustainable power generation that comprehensively utilize industrial wastewater and domestic sewage.