I embed the H-O framework with heterogeneous producers and their dynamic entry, exit and export decisions while the market structure is endogenous. Because of the endogenous market structure, contrary to the conventional export-driven mechanism, the competition elevates aggregate productivity through reallocating factors and changing producers' entry and exit decisions and therefore trade can have profound impact on those variables in import-competing instead of exporting sectors, which more accurately accords with intuitions and empirical observations. Besides, that H-O model with homogeneous producers and perfect competition is an isomorph, actually a special case, of this model, delivers the possibility for further extensions and test the implications by adapting theoretical and empirical tools based on traditional H-O model.