Sewer pipe materials exhibit diverse inner-surface features, which can affect the attachment of biofilm and influence microbial metabolic processes. To investigate the role of the type of pipe material on the composition and metabolic capabilities of the adhering microorganisms, three sets of urban sewers (High-Density Polyethylene Pipe (HDPE), Ductile Iron Pipe (DIP), and Concrete Pipe (CP)) were constructed. Measurements of biofilm thickness and environmental factors revealed that the thickest biofilm in CP pipes reached 2000 μm, with ORP values as low as −325 mV, indicating a more suitable anaerobic microbial habitat. High-throughput sequencing showed similar relative abundances of genera related to carbon and sulfur metabolism in the DIP and CP pipes, whereas HDPE exhibited only half the relative abundance compared to that found in the other pipes. To explore the impact of pipe materials on the mechanisms of microbial response, a metagenomic approach was used to investigate the biological transformation of carbon and sulfur in wastewater. The annotations of the crucial enzyme-encoding genes related to methyl coenzyme M and sulfite reductase in DIP and CP were 50 and 110, respectively, whereas HDPE exhibited lower counts (25 and 70, respectively). This resulted in significantly lower carbon and sulfur metabolism capabilities in the HDPE biofilm than in the other two pipes. The stability of wastewater quality during the transmission process in HDPE pipes reduces the metabolic generation of toxic and harmful gases within the pipes, favoring the preservation of carbon sources for sewer systems. This study reveals the variations in carbon and sulfur metabolism in wastewater pipe systems influenced by pipe materials and provides insights for designing future sewers.