We investigate the short- and long-term effects of a natural gas boom in an economy where energy can be produced with coal, natural gas, or clean sources and the direction of technology is endogenous. In the short run, a natural gas boom reduces carbon emissions by inducing substitution away from coal. Yet, the natural gas boom discourages innovation directed at clean energy, which delays and can even permanently prevent the energy transition to zero carbon. We formalize and quantitatively evaluate these forces using a benchmark model of directed technical change for the energy sector. Quantitatively, the technology response to the shale gas boom results in a significant increase in emissions as the US economy is pushed into a “fossil-fuel trap” where long-run innovations shift away from renewables. Overall, the shale gas boom reduces social welfare under laissez-faire, whereas, combined with the appropriate policy responses, it could have increased welfare substantially.