This paper examines the impact of two wastewater regulations on export product quality in China. Using a difference-in-differences approach and detailed data at the firm-product-country-year level, the study finds that overall product quality improves by 2%. Specifically, the first regulation leads to a 4.8% improvement, while the second regulation, which has stricter standards, results in a 9.3% decline in product quality. However, when aggregating the data at the firm-year level, decomposition analysis suggests that both regulations' intensive and extensive marginal effects almost equally improve product quality. Mechanistic analyses attribute the positive impact of the first regulation to advanced equipment adoption, innovation enhancement, and changes in firms' composition and products. Conversely, the negative effect of the second regulation stems from the reduction in the scale of firms producing high-quality products. Moreover, despite higher production costs and reduced labor demand, the first regulation enhances firms' competitiveness, while the second regulation diminishes their competitiveness.