Extracellular polymeric substances (EPSs) in waste activated sludge (WAS) are important guardians of active microorganisms against toxic emerging contaminants (ECs). However, how ECs interact with EPSs and microorganisms and further interfere with microbial functions during WAS anaerobic digestion has not been systemically disclosed. This work reported the dose-dependent effects of polyhexamethylene guanidine (PHMG, as a potential EC) on methane production during WAS digestion and comprehensively revealed the underlying mechanisms. PHMG at low dose showed an evident lag period for methane production (from 0.09 d in control to 8.23 d) but produced dramatic inhibition at high dose. Although PHMG promoted solubilization, hydrolysis, and acidification via enriching hydrolytic and acidogenic bacteria (i.e., Acidaminobacter and Acidibacter), methanogenesis was inhibited due to the reduction of methanogens (i.e., Methanosaeta and Syntrophomonas) and methanogenic activities related to acetoclastic and hydrogenotrophic methanogenesis (i.e., yhdR, pdhB, f wdB, and f rhD). Meanwhile, PHMG inhibited interspecies electron transfer between acidogens and methanogens via decreasing the biosynthesis of electron shuttles and e-pili (i.e., ribA, yigB, ribBA, and MtrD) and reducing mutualistic microorganisms (i.e., Desulfobulbus and Methanospirillum), which resulted in a decrease of methane formation. Further analysis found that PHMG disrupted EPSs (mainly proteins) and improved cell permeability. Then, it might enter the microbial cells to induce the formation of septal invaginations to disturb microbial replication as well as metabolic functions involved in methane biosynthesis. However, functional microorganisms could adapt to the low PHMG stress and significantly recover metabolic activities for methane production via upregulating functional genes related to microbial growth (e.g., FEN1 and f tsQ) and activating the quorum sensing system (LuxR/I system).