Heptapteridae is composed of 228 valid species allocated in 24 genera, making it the most diverse family within superfamily Pimelodoidea, a clade endemic to the Neotropical freshwaters. Heptapterids are widely distributed from southern Mexico to the Pampas of Argentina and occupy a variety of habitats generally in small‐ to medium‐sized rivers. To evaluate the phylogenetic relationships of Heptapteridae, we used a matrix with 1,319 ultraconserved elements (UCEs) from the genome from 56 specimens spanning 42 species and 24 genera of Heptapteridae and 19 related siluriform taxa. Maximum likelihood, Bayesian and coalescent‐based analyses strongly supported the monophyly of Heptapteridae and confirmed previous hypotheses of a sister relationship between Heptapteridae and Conorhynchos conirostris. We provide the evidence to recognize two subfamilies: (1) Rhamdiinae (Goeldiella, Rhamdella, Rhamdia, Brachyrhamdia, Pimelodella) and (2) Heptapterinae; with two tribes: Brachyglaniini new tribe (Gladioglanis, Myoglanis, Brachyglanis and Leptorhamdia) and Heptapterini (Mastiglanis, Chasmocranus, Cetopsorhamdia, Pariolius, Phenacorhamdia, Nemuroglanis, Imparfinis, Taunayia, Rhamdioglanis, Acentronichthys, Rhamdiopsis and Heptapterus). Inside Heptapterini, we recognize five subclades and provide putative morphological synapomorphies. This paper represents the first molecular hypothesis of intergeneric and interspecific relationships helping to better delineate heptapterid taxa.