In the model of vertical product differentiation, the quality of domestic products is inferior to that of foreign one. Our findings suggest that technology licensing from foreign firm to domestic one can enhance consumer surplus and social welfare. However, due to lower profits resulting from such licensing despite reduced tariff, foreign firm may be reluctant to engage in it. Further, we find that the domestic government can enhance social welfare by exchanging foreign firm's technology licensing for free with domestic firm through free trade under certain conditions, regardless of whether a fixed-fee or per-unit royalty licensing contract is used. This provides developing country firms with ideas on how to acquire technology from developed country firms.