We present a phylogenetic analysis with divergence time estimates, and an ecomorphological assessment of the role of the benthic-to-pelagic axis of diversification in the history of haemulid fishes. Phylogenetic analyses were performed on 97 grunt species based on sequence data collected from seven loci. Divergence time estimation indicates that Haemulidae originated during the mid Eocene (54.7–42.3 Ma) but that the major lineages were formed during the mid-Oligocene 30–25 Ma. We propose a new classification that reflects the phylogenetic history of grunts. Overall the pattern of morphological and functional diversification in grunts appears to be strongly linked with feeding ecology. Feeding traits and the first principal component of body shape strongly separate species that feed in benthic and pelagic habitats. The benthic-to-pelagic axis has been the major axis of ecomorphological diversification in this important group of tropical shoreline fishes, with about 13 transitions between feeding habitats that have had major consequences for head and body morphology.