Abstract Noncoding miRNAs tend to evolve within introns of coding genes who provide them with transcriptional opportunity. As an outcome of natural selection, the intragenic position of miRNAs is crucial for their expression, evolution and functional cooperation with the host gene. Therefore, understanding the evolution of intragenic miRNA structures may bring novel insights into genetic and phenotypic evolution. However, it remains largely unexplored. Here, by analysing miRNA genomics in 34 metazoan species, we found that the majority (630/1154) of miRNA families originated from introns of coding genes which provided them with initial transcriptional capacity. The most rapid expansion of intragenic miRNAs happened at the advent of vertebrates when 21 miRNA families emerged from introns of neural genes and reorganized the gene regulatory network, leading to the rise of vertebrate-specific neural crest (NC) cells, which transformed the invertebrate head and enabled the ecological shift from filter feeding to active predation. Intragenic miRNAs gradually gain independence from their host genes, which is accelerated by whole genome duplications (WGDs). After a WGD, the purging of redundant host genes often set an orphaned miRNA “free” to diversify with the transcriptional elements inherited from the host. WGDs facilitated a dramatic miRNA diversification during the initial divergence of vertebrates, as the intragenic status of twelve NC-regulating miRNAs was retained in jawed vertebrates but was lost in jawless cyclostomes, which diverged their neural crest development. We propose that coding genes not only facilitate the origination of new miRNAs, but also “sacrifice” themselves to help miRNA diversification.