The habit of mining within leaves has evolved convergently in numerous plant-feeding insect taxa. Many leaf-mining groups contain a large number of species with distinct feeding preferences, which makes them highly suitable for studies on the evolutionary history of host-plant use and on the role of niche shifts in speciation. We aimed to clarify the origin, classification, and ecological evolution of the tenthredinid sawfly subfamily Heterarthrinae, which contains c. 150 leaf-mining species that collectively feed on over 20 plant genera around the world. For this, we reconstructed the phylogeny of representative heterarthrine species and diverse outgroups from the superfamily Tenthredinoidea on the basis of DNA sequence data collected from two mitochondrial (CoI and Cytb) and two nuclear (EF-1α and NaK) genes. Thereafter, we inferred the history of niche diversification within Heterarthrinae by plotting larval host-plant associations on the trees, and by contrasting a time-calibrated leaf-miner phylogeny with the phylogeny of their host plants. The results show that: (1) heterarthrine leaf-miners constitute a monophyletic group that arose from external-feeding blennocampine lineages within the Tenthredinidae c. 110-80 million years ago; (2) heterarthrines generally radiated well after their host taxa, and extant host-plant associations therefore result from a combination of host conservatism and occasional shifts among available plant taxa; and (3) diversification in Heterarthrinae apparently occurs by multiple mechanisms, including sympatric or allopatric ecological speciation, non-ecological allopatric speciation, and possibly allochronic speciation. Overall, both present and historical host-use patterns within the Heterarthrinae exhibit striking similarities to patterns found in co-occurring herbivore taxa. Copyright © 2012 Elsevier Inc. All rights reserved.