The American seven-spined gobies (Gobiidae, Gobiosomatini) are highly diverse both in morphology and ecology with many endemics in the Caribbean region. We have reconstructed a molecular phylogeny of 54 Gobiosomatini taxa (65 individuals) based on a 1646-bp region that includes the mitochondrial 12S rRNA, tRNA-Val, and 16S rRNA genes. Our results support the monophyly of the seven-spined gobies and are in agreement with the existence of two major groups within the tribe, the Gobiosoma group and the Microgobius group. However, they reject the monophyly of some of the Gobiosomatini genera. We use the molecular phylogeny to study the dynamics of speciation in the Gobiosomatini by testing for departures from the constant speciation rate model. We observe a burst of speciation in the early evolutionary history of the group and a subsequent slowdown. Our results show a split among clades into coastal-estuarian, deep ocean, and tropical reef habitats. Major habitat shifts account for the early significant acceleration in lineage splitting and speciation rate and the initial divergence of the main Gobiosomatini clades. We found that subsequent diversification is triggered by behavior and niche specializations at least in the reef-associated clades. Overall, our results confirm that the diversity of Gobiosomatini has arisen during episodes of adaptive radiation, and emphasize the importance of ecology in marine speciation.