We provide the first molecular phylogeny of Keroplatidae and Lygistorrhinidae, families of fungus gnats (Diptera: Bibionomorpha: Sciaroidea). Phylogenies reconstructed by Maximum Likelihood and Bayesian methods, based on four nuclear and four mitochondrial gene markers (5106 base pairs) sequenced for 75 genera and 105 species, show Keroplatidae as monophyletic only with the family Lygistorrhinidae included, herewith treated as the subfamily Lygistorrhininae stat. nov. The subfamily Arachnocampinae is retained in the family, although lowering its overall support. An early branching clade, comprising species of Platyura Meigen, 1803 and Paleoplatyura melanderi Fisher, 1941, forms subfamily Platyurinae Loew, 1850 stat. nov. The subfamilies Sciarokeroplatinae and Macrocerinae grouped together with three genera considered here as Keroplatidae incertae sedis. Subfamily Lygistorrhininae forms a sister clade to subfamily Keroplatinae, both retained monophyletic with high support. The traditional division of the subfamily Keroplatinae into the tribes Orfeliini and Keroplatini appears as outdated, resting largely on adaptive characters prone to parallel evolution. We find support for an alternative tribe corresponding to the Cloeophoromyia–Asindulum genus group, but a tribal reclassification of the Keroplatinae is left for future studies. The genus Heteropterna Skuse, 1888 is considered as identical with Ctenoceridion Matile, 1972 syn. nov.