BackgroundStrengthening the recycling and utilization of resources is deeply significant in achieving carbon neutrality. The nanofiltration membranes possess separation ability within the nanoscale by utilizing special pore size ranges and surface charge properties, showing great application prospects in resource recycling. The commercial nanofiltration membranes are mainly prepared by interfacial polymerization with fast reaction speed and easy scaling‐up advantages. However, the obtained polyamide nanofiltration membranes possess dense selective layers with low permeance and separation efficiency to the molecules. Herein, the biodegradable surfactant sophorolipid was added to the aqueous solution to improve the performance of the polyamide nanofiltration membranes.ResultsCompared with the traditional nanofiltration membranes, the permeance of the sophorolipid‐modified nanofiltration membrane was improved from 3 to 18 L·m−2·h−1·bar−1. The modified membrane showed high rejection of the dyes with large molecular structures and low rejection of those with small molecular structures.ConclusionThe modified membrane may separate the mixed dye solution of congo red (molecular weight 696.66 g/mol) and indigo carmine (molecular weight 407.98 g/mol) and the mixed congo red/NaCl solution precisely. Besides, the modified membrane showed good anti‐fouling properties in the long‐term stability test. This study may offer research significance for the resource treatment of printing and dyeing wastewater. © 2024 Society of Chemical Industry (SCI).