We analyze how demand conditions faced by a firm in its export markets affect its innovation decisions. We exploit exogenous firm-level export demand shocks and find that firms respond by patenting more; furthermore this response is driven by the subset of initially more productive firms. The patent response arises 2 to 5 years after the shock, highlighting the time required to innovate. In contrast, the demand shock raises contemporaneous sales and employment for all firms regardless of their productivity. This skewed innovation response to common demand shocks arises naturally from a model of endogenous innovation and competition with firm heterogeneity.