Although ascarid nematodes are important parasites of wild animals of public health concern, few species of ascarids from wild animals have been studied at the molecular level so far. Here, the classification and phylogenetic relationships of roundworms from 21 species of captive wild animals have been studied by sequencing and analysis of parts of the ribosomal 18S and 28S genes and the mitochondrial (mt) 12S gene. Phylogenetic relationships were inferred by 3 methods (NJ/MP/ML) based on the data of single gene sequences and concatenated sequences. Homology analysis indicated that the 18S sequences were conserved among roundworms from all 21 species and that 28S showed interspecies variability. Divergence levels displayed in 12S suggested that 12S appears to be either intra- or interspecifically variable. Evolutionary trees indicated that the ascarids split into 2 families, 4 genera and 7 species, with high bootstrap support for each clade. Combined trees suggested that Baylisascaris ailuri is more closely related to B. transfuga than to B. schroederi. This study provides useful molecular markers for the classification, phylogenetic analysis and epidemiological investigation of roundworms from wild animals.