Monocarpic plant species, where reproduction is fatal, frequently exhibit variation in the length of their prereproductive period prior to flowering. If this life-history variation in flowering strategy has a genetic basis, genotype-by-environment interactions (G × E) may maintain phenotypic diversity in flowering strategy. The native monocarpic plant Common Evening Primrose (Oenothera biennis L., Onagraceae) exhibits phenotypic variation for annual vs. biennial flowering strategies. I tested whether there was a genetic basis to variation in flowering strategy in O. biennis, and whether environmental variation causes G × E that imposes variable selection on flowering strategy. In a field experiment, I randomized more than 900 plants from 14 clonal families (genotypes) into five distinct habitats that represented a natural productivity gradient. G × E strongly affected the lifetime fruit production of O. biennis, with the rank-order in relative fitness of genotypes changing substantially between habitats. I detected genetic variation in annual vs. biennial strategies in most habitats, as well as a G × E effect on flowering strategy. This variation in flowering strategy was correlated with genetic variation in relative fitness, and phenotypic and genotypic selection analyses revealed that environmental variation resulted in variable directional selection on annual vs. biennial strategies. Specifically, a biennial strategy was favoured in moderately productive environments, whereas an annual strategy was favoured in low-productivity environments. These results highlight the importance of variable selection for the maintenance of genetic variation in the life-history strategy of a monocarpic plant.