In-sewer stability of biomarkers is a critical factor for wastewater-based epidemiology, as it could affect the accuracy of the estimated prevalence of substances in the community. The spatiotemporal variations of environmental and biological conditions in sewers can influence the transformation of biomarkers. To date, the relationship between environmental variables and biomarker stability in sewers is poorly understood. Therefore, this study evaluated the transformation of common illicit drug and pharmaceutical biomarkers in laboratory sewer reactors with different levels of pH, temperature, and suspended solids. The correlations between degradation rates of 14 biomarkers, 3 controlled environmental variables (pH, temperature, and suspended solids concentration), and 3 biological activity indicators (sulfide production rate, methane production rate, and the removal rate of soluble chemical oxygen demand (SCOD)) were assessed using correlation matrix, stepwise regression method, and principal component analysis. The consistent results affirmed the dominant effects of biological activities and pH on biomarker transformation in sewers, particularly for labile compounds, whereas the impact of temperature or suspended solids was less significant. This study enhances the understanding of factors affecting the fate of micropollutants in sewer systems and facilitates the interpretation of WBE results for assessing drug use and public health in communities.