This paper theoretically analyzes the direct impact of environmental regulation on carbon emissions and its indirect effects on carbon emissions through foreign direct investment (FDI), energy consumption, industrial structure, and technological innovation. Then, this paper constructs a spatial lag model to empirically test the dual effects of environmental regulation on carbon emissions based on the provincial panel data of 2003–2017 in China. The results show that the average Moran’s I value of carbon emissions during 2003–2017 is 0.2506, passing the significance test at 1% level, and carbon emissions have spatial correlation characteristics. The direct impact of environmental regulation on carbon emissions is significant and positive. Environmental regulation could indirectly influence carbon emissions by influencing FDI, energy consumption, and technological innovation, and meanwhile, FDI, energy consumption, and technological innovation help to reduce carbon emissions under the constraint of environmental regulation, specifically. However, the impact of environmental regulation on carbon emissions through industrial structure is not significant.