Evolvability, the ability of populations to adapt, can evolve through changes in the mechanisms determining genetic variation and in the processes of development. Here we construct and evolve a simple developmental model in which the pleiotropic effects of genes can evolve. We demonstrate that selection in a changing environment favors a specific pattern of variability, and that this favored pattern maximizes evolvability. Our analysis shows that mutant genotypes with higher evolvability are more likely to increase to fixation. We also show that populations of highly evolvable genotypes are much less likely to be invaded by mutants with lower evolvability, and that this dynamic primarily shapes evolvability. We examine several theoretical objections to the evolution of evolvability in light of this result. We also show that this result is robust to the presence or absence of recombination, and explore how nonrandom environmental change can select for a modular pattern of variability.