In Lepidoptera (butterflies and moths), the genomic region around the gene cortex is a "hotspot" locus, repeatedly implicated in generating intraspecific melanic wing color polymorphisms across 100 million years of evolution. However, the identity of the effector gene regulating melanic wing color within this locus remains unknown. We show that none of the four candidate protein-coding genes within this locus, including cortex, serve as major effectors. Instead, a microRNA (miRNA), mir-193, serves as the major effector across three deeply diverged lineages of butterflies, and its role is conserved in Drosophila. In Lepidoptera, mir-193 is derived from a gigantic primary long noncoding RNA, ivory, and it functions by directly repressing multiple pigmentation genes. We show that a miRNA can drive repeated instances of adaptive evolution in animals.