Flowering time is an important life history trait in plants that often affects fitness. The optimal time to flower may be influenced by trade-offs between flowering time and growth-related traits and is thus likely to differ among habitats. Because flowering-time differences between populations can also reduce gene flow, understanding the factors that contribute to variation in flowering time among closely adjacent populations that experience gene flow is of particular interest. Plant adaptation to different edaphic environments provides some of the best examples of adaptive divergence at small spatial scales, and often coincides with flowering-time shifts. The current study addresses the causes of flowering-time differences in two populations of Leptosiphon parviflorus that are locally adapted to adjacent serpentine and sandstone soils despite moderate levels of gene flow and close geographic proximity. Field reciprocal-transplant studies and watering manipulations in the greenhouse demonstrate the contribution of both the genotype and the environment to observed flowering-time differences. The plasticity of flowering time in response to soil type appears to be driven by differences in soil moisture. In addition, selection on flowering time was measured in both soil types across 4 years of study using a set of F5 advanced-generation hybrids and found to differ between the habitats. Therefore, both selection and plasticity contribute to flowering-time differences between these populations and thus have likely played an important role in the initiation and/or maintenance of adaptive divergence in this system.