Genetic assimilation is a process by which a trait originally driven by the environment becomes independent of the initial cue and is expressed constitutively in a population. More than seven decades have passed since Waddington's pioneering demonstration of the acquisition of morphological traits through genetic assimilation, but the underlying mechanism remains unknown. Here, we address this gap by performing a multi-omic analysis of Waddington's genetic assimilation using the ectopic veins phenocopy in Drosophila as a model. Our study reveals the assimilation of ectopic veins in both outbred and inbred fly natural populations, despite their initially limited genetic diversity. The assimilation of ectopic veins is driven by the selection of regulatory alleles already present in the ancestral populations, including downregulation of the Cad96Ca tyrosine kinase gene by the insertion of a transposable element in its 3' untranslated region. The genetic variation at this locus in the inbred population is maintained by a large chromosomal inversion. In outbred populations, the evolution of ectopic veins results from a polygenic response shaped by the selective environment. Our results support a model in which selection for multiple pre-existing alleles in the ancestral population, rather than stress-induced genetic or epigenetic variation, drives the evolution of ectopic veins in natural fly populations.