Ascaridoids are among the commonest groups of zooparasitic nematodes (roundworms) and occur in the alimentary canal of all major vertebrate groups, including humans. They have an extremely high diversity and are of major socio-economic importance. However, their evolutionary history remains poorly known. Herein, we performed a comprehensive phylogenetic analysis of the Ascaridoidea. Our results divided the Ascaridoidea into six monophyletic major clades, i.e., the Heterocheilidae, Acanthocheilidae, Anisakidae, Ascarididae, Toxocaridae, and Raphidascarididae, among which the Heterocheilidae, rather than the Acanthocheilidae, represents the sister clade to the remaining ascaridoids. The phylogeny was calibrated using an approach that involves time priors from fossils of the co-evolving hosts, and dates the common ancestor of the Ascaridoidea back to the Early Carboniferous (approximately 360.47–325.27 Ma). The divergence dates and ancestral host types indicated by our study suggest that members of the Ascaridoidea first parasitized terrestrial tetrapods, and subsequently, extended their host range to elasmobranchs and teleosts. We also propose that the fundamental terrestrial-aquatic switches of these nematodes were affected by changes in sea-level during the Triassic to the Early Cretaceous.