In this paper, we consider a duopoly competing on quantity, where firms can invest in R&D to control their emissions. We distinguish between efforts carried out to acquire first-hand knowledge (inventive R&D) and efforts made to develop an absorptive capacity to be able to capture part of the knowledge developed by the rival. There are also free R&D spillovers between firms. To reach the first best outcome, the regulator uses three instruments, namely, a per-unit emissions tax, a per-unit inventive-research subsidy, and a per-unit absorptive-research subsidy. The socially optimal investment cost in inventive R&D is always higher than that in absorptive R&D. Interestingly, when the free spillover is high enough, the regulator gives a greater per-unit subsidy for inventive research, and when it is low enough and the marginal damage cost of pollution is sufficiently high, the regulator supports absorptive research to strengthen R&D spillovers. Moreover, inventive research is actually taxed when the free spillover is low and the marginal damage cost of pollution is high.