Abstract Membrane separation processes may have an improved efficiency and reduced operating cost in comparison with the traditional concentration processes used in the pharmaceutical industry. A kind of novel polyimide nanofiltration membrane was developed for concentrating spiramycin extract. The performance of the polyimide membrane to separate spiramycin and a solvent, butyl acetate, was investigated. The membrane shows an excellent solvent-resistant property. There was no apparent change in average processing capacity observed after long-term operation (35 days). The separation performance of the nanofiltration membrane is encouraging. The permeation flux reached 20 L/(m2·h) at ambient temperature, and the rejection of spiramycin was over 99%. The influence of the operating pressure, temperature, flowrate and the concentration of the feedstock on the permeation flux and rejection of spiramycin was studied. The results show that these operating parameters have a significant influence on the permeation flux but have little effect on rejection. This study also illustrates that the nanofiltration membrane process is a promising technique for the concentration of antibiotic extracts and for the recovery of organic solvents.