The 2-C-methyl-d-erythritol-4-phosphate (MEP) pathway provides the precursors for the biosynthesis of plastidial isoprenoids, which include the carotenoid pigments of many fruits. We have analysed the genes encoding the seven enzymes of the MEP pathway in melon (Cucumis melo L.) and determined that the first one, 1-deoxyxylulose 5-phosphate synthase (DXS), and the last one, 1-hydroxy-2-methyl-2-(E)-butenyl 4-diphosphate reductase (HDR), are represented in the genome as a small gene family and paralogous pair, respectively. In the case of DXS, three genes encode functional DXS activities which fall into previously established type I (CmDXS1) and II (CmDXS2a and CmDXS2b) categories, while a fourth DXS-like gene belonging to the type III group did not encode a protein with DXS activity. Their expression patterns and phylogenies suggest that CmDXS1 is functionally specialized for developmental and photosynthetic processes, while CmDXS2a and CmDXS2b are induced in flowers and ripening fruit of orange- (but not white-) fleshed varieties, coinciding with β-carotene accumulation. This is the first instance connecting type II DXS genes to specialized isoprenoid biosynthesis in the fruit of an agronomically important species. Two HDR paralogues were shown to encode functional enzymes, although only CmHDR1 was highly expressed in the tissues and developmental stages tested. Phylogenetic analysis showed that in cucurbits such as melon, these HDR paralogues probably arose through individual gene duplications in a common angiosperm ancestor, mimicking a prior division in gymnosperms, while other flowering plants, including apple, soy, canola, and poplar, acquired HDR duplicates recently as homoeologues through large-scale genome duplications. We report the influence of gene duplication history on the regulation of the MEP pathway in melon and the role of specialized MEP-pathway isoforms in providing precursors for β-carotene production in orange-fleshed melon varieties. © The Author 2014. Published by Oxford University Press on behalf of the Society for Experimental Biology.