The Andes of South America contain one of the richest avifaunas in the world, but little is known about how this diversity arises and is maintained. Variation in mitochondrial DNA and morphology within the speckled hummingbird (Adelomyia melanogenys) was used to elucidate the phylogeographic pattern along an Ecuadorian elevational gradient, from the coastal cordillera to the inland Andean montane region. We examined sequence, climatic/remote sensing and morphological data to understand the effects of topography and ecology on patterns of variation. Populations on either side of the Andes are genetically divergent and were separated during a period that corresponds to the final stages of Andean uplift during the Pliocene. Despite isolation, these two populations were found to be morphologically similar suggesting a strong effect of stabilizing selection across ecologically similar Andean cloud forests, as assessed using climatic and remote sensing data. In contrast, little genetic divergence was found between coastal and west-Andean individuals, suggesting recent interruption of gene flow between these localities. However, coastal populations were found to inhabit different habitats compared to Andean populations as shown by climatic and remote sensing variables. Furthermore, coastal individuals had significantly longer bills compared to their montane relatives, indicative of differential directional selection and the influence of habitat differences in shaping phenotypic variation. Results highlight the role of both isolation and ecology in diversification in Ecuadorian montane regions, while suggesting the two may not always act in concert to produce divergence in adaptive traits.