This paper examines the effects of trade openness on managerial incentives and firm-level productivity by incorporating the principal-agent mechanism into the heterogeneous firm trade framework inter alia Melitz (Econometrica 71:1695-1725, 2003). We show that opening up to trade generally leads to a steeper optimal managerial incentive scheme (and hence, higher firm productivity) via a new mechanism by which selection of heterogeneous firms into the export market plays a key role. This is because trade openness unambiguously increases the variation of firm profits by reallocating profits towards ex post low-cost exporters, leading to a higher stake of the market game faced by the principals. Interestingly, it is further shown that, whilst falling variable trade costs unambiguously increase managerial incentives, a reduction in fixed trade costs could possibly lead to weaker incentives and thus generate productivity losses due to an adverse inter-firm reallocation effect. Hence, the model establishes a causal link between the Melitz-type reallocation effect and the within-firm productivity changes, both of which have been identified as important sources of aggregate productivity gains from trade by recent empirical studies.