We consider a population that adapts to a gradually changing environment. Our aim is to describe how ecological and genetic factors combine to determine the genetic basis of adaptation. Specifically, we consider the evolution of a polygenic trait that is under stabilizing selection with a moving optimum. The ecological dynamics are defined by the strength of selection,s, and the speed of the optimum,ṽ; the key genetic parameters are the mutation rate Q and the variance of the effects of new mutations, v. We develop analytical approximations within an ''adaptive-walk'' framework and describe how selection acts as a sieve that transforms a given distribution of new mutations into the distribution of adaptive substitutions. Our analytical results are complemented by individual-based simulations. We find that (i) the ecological dynamics have a strong effect on the distribution of adaptive substitutions and their impact depends largely on a single composite measure g ¼ṽ=ðsQv 3 Þ, which combines the ecological and genetic parameters; (ii) depending on g, we can distinguish two distinct adaptive regimes: for large g the adaptive process is mutation limited and dominated by genetic constraints, whereas for small g it is environmentally limited and dominated by the external ecological dynamics; (iii) deviations from the adaptive-walk approximation occur for large mutation rates, when different mutant alleles interact via linkage or epistasis; and (iv) in contrast to predictions from previous models assuming constant selection, the distribution of adaptive substitutions is generally not exponential.A N important aim for both empirical and theoretical evolutionary biologists is to better understand the genetics of adaptation (e.g., Orr 2005a). For example, among the multitude of mutations that arise in a population, which ones are eventually fixed and contribute to evolutionary change? That is, given a distribution of new mutations, what is the distribution of adaptive substitutions (or fixed mutations)? Here, distribution means the probability distribution of the effects of mutations on either the phenotype or the fitness of their carriers. In principle, both the distribution of new mutations and the distribution of adaptive substitutions can be measured empirically, the former from mutation accumulation experiments (Eyre-Walker and Keightley 2007) and the latter from QTL (e.g., Bradshaw et al. 1998) or experimental evolution (Elena and Lenski 2003) studies. However, as only a small subset of all mutations is beneficial, such measurements are difficult. Therefore, a large role in studying the genetics of adaptation has to be played by theoretical modeling.In recent years, several different approaches have emerged for modeling the process of adaptation. Gillespie 1983Gillespie , 1984Orr 2002), various models of so-called ''adaptive walks'' on rugged fitness landscapes (e.g., Kauffman and Levin 1987;Kauffman 1993), and models of clonal interference in asexual populations (e.g., Gerrish and Lenski 1998;Park and Krug...