The phylogeny of all known Xiphorhynchus (Dendrocolaptidae) species and many of its subspecies was reconstructed to evaluate species limits in this taxonomically challenging genus and investigate the possible role played by the Amazonian “várzea” (floodplain forest)–“terra-firme” (upland forest) ecotone in its diversification. Phylogenies were inferred based on 2,430 bp of the mitochondrial DNA genes ND2, ND3, and cytochrome b. All phylogeny estimates supported the monophyly of all extant Xiphorhynchus species to the exclusion of the sibling species pair Straight-billed (X. picus) and Zimmer's (X. kienerii) woodcreeper. Confirming findings of previous molecular and anatomical studies, strong support was found to include the Lesser Woodcreeper (Lepidocolaptes fuscus) in Xiphorhynchus. Levels of sequence divergence among some subspecies of Buff-throated (X. guttatus), Ocellated (X. ocellatus), and Spix's (X. spixii) woodcreepers reached or exceeded those found between closely related, undisputed biological species of Xiphorhynchus. High levels of sequence differentiation and the paraphyly of some Xiphorhynchus species indicated that the following taxa should be recognized as species: Lafresnaye's (X. guttatoides), Tschudi's (X. chunchotambo), and Elegant (X. elegans) woodcreepers. All Xiphorhynchus species restricted to terra-firme forest in lowland Amazonia formed a well supported monophyletic group, whereas species restricted to várzea forest were either basal to a clade containing species found in a wide variety of habitats (Striped Woodcreeper [X. obsoletus]) or belonged to a distinct lineage likely to be regarded as a separate genus (X. kienerii). These findings falsified an anticipated sister relationship between várzea and terra-firme species, as expected if the várzea–terra-firme ecotone had played a decisive role in population differentiation and speciation within Xiphorhynchus. Instead, phylogeny estimates suggested that the várzea–terra-firme habitat specialization evolved early on in the evolutionary history of Xiphorhynchus and that subsequent differentiation occurred mostly within the terra-firme habitat.