Sciaroidea is a megadiverse clade within Diptera that exhibits diverse larval feeding modes. In this study, we explored the phylogenetic relationships and evolution of larval feeding modes within the superfamily using a fossil-calibrated time tree. We found that filtering out potentially fast-evolving sites altered the family-level tree topology, and that species within Sciaroidea incertae sedis might be crucial in determining the general tree topology.The most recent common ancestor of Sciaroidea was inferred to have originated in the UpperTriassic (∼225 Ma). A major radiation of families occurred from the UppermostTriassic to the Lowermost Jurassic (190–200 Ma). The ancestral larval feeding mode was inferred to be mycophagy. Most families retained this feature with only minor transitions occurring in some clades; however, Cecidomyiidae and Keroplatidae went through notable shifts in larval feeding mode. Cecidomyiidae underwent a transition from mycophagy to phytophagy in the Lower Cretaceous, in line with angiosperm radiation as suggested in previous studies.The larvae of stem Keroplatidae were inferred to be predators since the Jurassic. A transition back to mycophagy occurred within the subfamily Keroplatinae during the Paleogene to Uppermost Cretaceous, coinciding with the origin and radiation of species-rich mycophagous clades of other sciaroid families. Our study highlights the importance of taxon sampling and sequence filtering in phylogenetic analyses of Sciaroidea. We suggest, based on temporal patterns of lineage diversification, that the evolution of larval feeding modes within the group might be correlated with the diversification of mushroom-forming fungi and angiosperms.