Membrane fouling has been a challenge for the practical application of gravity-driven membrane (GDM) systems. In this paper, gravity-driven up-flow slow biofilter (GUSB) was used before the GDM system to mitigate membrane fouling, and the spatial distribution of the fouling characteristics was investigated. The cake layer resistance (Rc) and membrane pore resistance (Rp) were reduced after GUSB pretreatment, resulting in a 62% increase in permeate flux. In the membrane module vertical direction, Rc and Rp declined sequentially from top to bottom. The ratio of protein to polysaccharide (PN/PS) was highly negatively correlated with nanoparticle size (Pearson's r = −0.89), and was the key factor shaping the bacterial community (Mantel's r = 0.95). The increased relative abundance of functional bacteria (such as Candidatus_Obscuribacter genus) and metabolic functions (amino acid, carbohydrate, and energy) was associated with the structure and composition of the biofouling layer. Rc has the highest weight ratio (0.699) for membrane resistance. Nanoparticle size influenced surface porosity and composition of the biofouling layer by regulating bacterial community diversity and metabolic functions, which indirectly determined membrane resistance (indirect effect coefficient = −2.018). This study would spark a wider application of GDM in drinking water treatment, and provided a comprehensive explanation for the membrane fouling mechanism.