Cheirodontinae are endemic to the Neotropical Region and are widely distributed throughout the major river drainages of Central and South America. Among the species occurring in the freshwater ecoregions of northeastern Brazil, Serrapinnus piaba was originally described as endemic to the São Francisco (SF) freshwater ecoregion. However, its distribution later extended to the drainages of the Northeastern Mata Atlântica (NMAF) freshwater ecoregion. This distribution pattern partially supports the hypothesis of past hydrographic connections between these regions. To evaluate this hypothesis, this study investigated, described, and analyzed the phylogeographic pattern of S. piaba across the NMAF and SF ecoregions. Phylogeographic and historical demographic analyses were conducted based on the mitochondrial COI marker across five river basins distributed across the ecoregions of interest (20 individuals from the NMAF and 9 from the SF). The Bayesian Inference topology recovered all sampled populations as a monophyletic group. Nine haplotypes were identified, of which only two were shared. This pattern reveals genetic structuring between the NMAF and SF populations, corroborated by the high number of mutational steps separating the haplotypes from these regions (n = 21). Interestingly, a single haplotype shared between the two ecoregions was detected in an area where headwater capture events between the São Francisco River Basin and NMAF drainages have previously been proposed, and where wind gaps have also been documented. Furthermore, within the NMAF, the sharing of one haplotype between the Paraguaçu and Pojuca river basins, which are currently isolated from one another, may be interpreted as evidence of a historical connection between these drainages, possibly mediated by headwater capture events. Neutrality tests detected no evidence of recent population expansion. Overall, the results reveal strong genetic structuring among S. piaba populations, consistent with the historical isolation of the drainages in the studied ecoregions, and support the hypothesis of past hydrographic connections between specific river basins, most likely resulting from headwater capture events.