This paper develops a model where firms across countries differ in their capacity to innovate. Our main goal is to study firm level innovation under various trade policy shocks. We consider two countries where firms across countries are heterogeneous in their innovation efficiencies. We find that the benefits of trade liberalization and trade protection differ across firms. One of the main results we obtain is that trade protection hurts the productivity of highly efficient firms while it increases the productivity of lowly efficient firms. The predictions of our model are in line with recent empirical evidence that while trade protection fosters the productivity of lowly efficient firms, it reduces productivity of highly efficient firms.