Exploiting the 2014 Environmental Protection Law (EPL) in China as quasi-natural experiments, we adopt a difference-in-differences approach to examine the impact of environmental regulation on corporate cash holdings. We document that heavy-polluting firms increase their cash holdings 15% more than non-heavy-polluting firms due to stringent environmental regulation. Further tests show that the heightened environmental uncertainty, the limited access to bank loans, and the decline in obtaining government subsidies for heavy-polluting firms are three plausible channels that allow environmental regulation to increase corporate cash holdings. The effects of environmental regulation on cash holdings are stronger for firms without political backgrounds and those in regions with less dependent on the secondary sector. Overall, our results offer original evidence showing how environmental regulation in emerging economies affects firms’ liquidity management decisions and support the precautionary effect of cash holdings.