Biofilms in drinking water distribution systems (DWDSs) are a determinant to drinking water biosafety. Yet, how and why pipe material and natural organic matter (NOM) affect biofilm microbial community, pathogen composition and antibiotic resistome remain unclear. We characterized the biofilms' activity, microbial community, antibiotic resistance genes (ARGs), mobile genetic elements (MGEs) and pathogenic ARG hosts in Centers for Disease Control and Prevention (CDC) reactors with different NOM dosages and pipe materials based on metagenomics assembly. Biofilms in cast iron (CI) pipes exhibited higher activity than those in polyethylene (PE) pipes. NOM addition significantly decreased biofilm activity in CI pipes but increased it in PE pipes. Pipe material exerted more profound effects on microbial community structure than NOM. Azospira was significantly enriched in CI pipes and Sphingopyxis was selected in PE pipes, while pathogen (Ralstonia pickettii) increased considerably in NOM-added reactors. Microbial community network in CI pipes showed more edges (CI 13520, PE 7841) and positive correlation proportions (CI 72.35%, PE 61.69%) than those in PE pipes. Stochastic processes drove assembly of both microbial community and antibiotic resistome in DWDS biofilms based on neutral community model. Bacitracin, fosmidomycin and multidrug ARGs were predominant in both PE and CI pipes. Both pipe materials and NOM regulated the biofilm antibiotic resistome. Plasmid was the major MGE co-existing with ARGs, facilitating ARG horizontal transfer. Pathogens (Achromobacter xylosoxidans and Ralstonia pickettii) carried multiple ARGs (qacEdelta1, OXA-22 and aadA) and MGEs (integrase, plasmid and transposase), which deserved more attention. Microbial community contributed more to ARG change than MGEs. Structure equation model (SEM) demonstrated that turbidity and ammonia affected ARGs by directly mediating Shannon diversity and MGEs. These findings might provide a technical guidance for controlling pathogens and ARGs from the point of pipe material and NOM in drinking water.