This article estimates the effect of environmental regulation on firm productivity using a spatial regression discontinuity design implicit in China’s water quality monitoring system. Because water quality readings are important for political evaluations and the monitoring stations only capture emissions from their upstream regions, local government officials are incentivized to enforce tighter environmental standards on firms immediately upstream of a monitoring station, rather than those immediately downstream. Exploiting this discontinuity in regulation stringency with novel firm-level geocoded emission and production data sets, we find that immediate upstream polluters face a more than 24% reduction in total factor productivity (TFP), and a more than 57% reduction in chemical oxygen demand emissions, as compared with their immediate downstream counterparts. We find that the discontinuity in TFP does not exist in nonpolluting industries, only emerged after the government explicitly linked political promotion to water quality readings, and was predominantly driven by prefectural cities with career-driven leaders. Linking the TFP estimate with the emission estimate, a back-of-the-envelope calculation indicates that China’s water regulation efforts between 2000 and 2007 were associated with an economic cost of more than 800 billion Chinese yuan.