Eggplant (Solanum melongena L.) is an important horticultural crop and one of the most widely grown vegetables from the Solanaceae family. It was domesticated from a wild, prickly progenitor carrying small, round, non-anthocyanic fruits. We obtained a novel, highly contiguous genome assembly of the eggplant ’67/3′ reference line, by Hi-C retrofitting of a previously released short read and optical mapping-based assembly. The sizes of the 12 chromosomes and the fraction of anchored genes in the improved assembly were comparable to those of a chromosome-level assembly. We resequenced 23 accessions of S. melongena representative of the worldwide phenotypic, geographic and genetic diversity of the species, and one each from the closely related species S. insanum and S. incanum. The eggplant pan-genome contained ~51.5 additional megabases and 816 additional genes with respect to the reference genome, while the pan-plastome showed little genetic variation. We identified 53 selective sweeps related to fruit color, prickliness and fruit shape in the nuclear genome, highlighting selection leading to the emergence of present-day S. melongena cultivars from its wild ancestors. Candidate genes underlying the selective sweeps included a MYBL1 repressor and CHALCONE ISOMERASE (for fruit color), homologs of Arabidopsis GLABRA 1 and GLABROUS INFLORESCENCE STEMS 2 (for prickliness) and orthologs of tomato FW2.2, OVATE, LC/WUSCHEL, SUPPRESSOR OF OVATE (SOV) and CELL SIZE REGULATOR (for fruit size/shape), further suggesting that selection for the latter trait relied on a common set of orthologous genes in tomato and eggplant.