Three lab-scale membrane bioreactors (MBRs) were continuously operated to treat saline wastewater under 0%, 0.75% and 1.5% NaCl stress. 0.75% and 1.5% NaCl reduced the COD and NH4+–N removal at the beginning, while the removal efficiencies could be recovered along with the operation of MBRs. Also, the polysaccharide in extracellular polymeric substances (EPS) and soluble microbial products (SMP) played an important role in the membrane fouling. Illumina sequencing of 16S rRNA gene showed that the increasing level of salinity reduced the diversity of the microbial community, and a higher salinity stimulated the growth of Bacteroidetes. At genus level, Flavobacterium, Aequorivita, Gelidibacter, Microbacterium, and Algoriphagus increased with the increase of salinity, which are shown to be highly salt tolerant. The strength of salinity or the duration of salinity could stimulate the microorganisms with similar functions, and the changes of polysaccharide in EPS and SMP were closely related to the membrane fouling rate as well as correlated with some saline-resistance genera