This paper investigates the optimal licensing contract for a product innovation in a vertically differentiated duopoly. The two firms have different marginal costs and the high-quality firm can license its technology on product quality to the low-quality firm. It is found that the optimal form of licensing contract depends on the relative marginal costs of the two firms. If the marginal cost of the high-quality firm is relatively high (low), fixed-fee licensing is superior (inferior) to royalty licensing from the viewpoint of the licensor. Surprisingly, consumers are worse off if the quality difference between the two firms is small. This result is in contrast to the received wisdom in the product licensing literature.