Divergent selection on traits involved in both local adaptation and the production of mating signals can strongly facilitate population differentiation. Because of its links to foraging morphologies and cultural inheritance song of birds can contribute particularly strongly to maintenance of local adaptations. In two adjacent habitats--native Sonoran desert and urban areas--house finches (Carpodacus mexicanus) forage on seeds that are highly distinct in size and shell hardness and require different bite forces and bill morphologies. Here, we first document strong and habitat-specific natural selection on bill traits linked to bite force and find adaptive modifications of bite force and bill morphology and associated divergence in courtship song between the two habitats. Second, we investigate the developmental basis of this divergence and find that early ontogenetic tissue transformation in bill, but not skeletal traits, is accelerated in the urban population and that the mandibular primordia of the large-beaked urban finches express bone morphogenetic proteins (BMP) earlier and at higher level than those of the desert finches. Further, we show that despite being geographically adjacent, urban and desert populations are nevertheless genetically distinct corroborating findings of early developmental divergence between them. Taken together, these results suggest that divergent selection on function and development of traits involved in production of mating signals, in combination with localized learning of such signals, can be very effective at maintaining local adaptations, even at small spatial scales and in highly mobile animals.