Environmental heterogeneity, spatial variation in selection pressure and gene flow are known to be important for shaping intra-specific variation and local adaptations. However, their roles as drivers of variation and divergence in behavioral traits have seldom been studied. Here, we studied the phenotypic divergence of breeding and fledgling blue tits (Cyanistes caeruleus) for personality traits across three wild populations situated in contrasted habitats yet connected by gene flow. We first compared the mean personality phenotype of each population. Second, using common garden, reciprocal transplant and cross-fostering experiment we investigated the genetic basis of the observed divergence. Third, we determined the selection pressure acting on the personality phenotype in each population. We found phenotypic and genetic difference between populations and our results suggested that these divergences result from the local selection regime in each habitat. Overall, our results highlight the importance of environmental heterogeneity in the maintenance of small-scale intra-specific variation for behavioral traits.