The genus Corydalis, with ca. 530 species, has long been considered taxonomically challenging because of its great variability. Previous molecular analyses, based on a few molecular markers and incomplete taxonomic sampling, were clearly inadequate to delimit sections and subgenera. We have performed phylogenetic analyses of Corydalis and related taxa, using 65 shared protein‐coding plastid genes from 313 accessions (including 280 samples of ca. 226 species of Corydalis) and 152 universal low‐copy nuclear genes from 296 accessions (including 271 samples of Corydalis) covering all 42 previously recognized sections and five independent “series”. Phylogenetic trees were inferred using Bayesian Inference and Maximum Likelihood. Eight selected morphological characters were estimated using ancestral state reconstructions. Results include: (i) of the three subgenera of Corydalis, two are fully supported by both the plastid and nuclear data; the third, subg. Cremnocapnos, is weakly supported by plastid DNA only, whereas in the nuclear data the two included sections form successive outgroups to the rest of the genus; (ii) among all 42 sections and five “series”, 25 sections and one “series” are resolved as monophyletic in both data sets; (iii) the common ancestor of Corydalis is likely to be a perennial plant with a taproot, yellow flowers with a short saccate spur, linear fruits with recurved fruiting pedicels, and seeds with elaiosomes; (iv) we provide a new classification of Corydalis with four subgenera (of which subg. Bipapillatae is here newly described), 39 sections, 16 of which are consistent with the previous classification, 16 sections have been recircumscribed, one section has been reinstated and six new sections are established. Characters associated with lifespan, underground structures, floral spur, fruit and elaiosomes are important for the recognition of subgenera and sections. These new phylogenetic analyses combined with ancestral character reconstructions uncovered previously unrecognized relationships, and greatly improved our understanding of the evolution of the genus.