The crab-eating fox is a medium-sized Neotropical canid with generalist habits and a broad distribution in South America. We have investigated its genetic diversity, population structure and demographic history across most of its geographic range by analysing 512 base pairs (bp) of the mitochondrial DNA (mtDNA) control region, 615 bp of the mtDNA cytochrome b gene and 1573 total nucleotides from three different nuclear fragments. MtDNA data revealed a strong phylogeographic partition between northeastern Brazil and other portions of the species’ distribution, with complete separation between southern and northern components of the Atlantic Forest. We estimated that the two groups diverged from each other c. 400 000–600 000 years ago, and have had contrasting population histories. A recent demographic expansion was inferred for the southern group, while northern populations seem to have had a longer history of large population size. Nuclear sequence data did not support this north–south pattern of subdivision, likely due at least in part to secondary male-mediated historical gene flow, inferred from multilocus coalescent-based analyses. We have compared the inferred phylogeographic patterns to those observed for other Neotropical vertebrates, and report evidence for a major north–south demographic discontinuity that seems to have marked the history of the Atlantic Forest biota.