We analyze a stochastic quantitative genetic model for the joint dynamics of population size N and evolution of a multidimensional mean phenotype (z) under density-dependent selection. This generalizes our previous theories of evolution in fluctuating environments to include density-dependent (but frequency-independent) selection on quantitative characters. We assume that appropriate constraints or trade-offs between fitness components exist to prevent unlimited increase of fitness. We also assume weak selection such that the expected rate of return to equilibrium is much slower for (z) than N. The mean phenotype evolves to a stationary distribution around an equilibrium point z(opt) that maximizes a simple function determined by ecological parameters governing the dynamics of population size. For any (z), the expected direction of phenotypic evolution is determined by the additive genetic covariance matrix G and the gradient of this function with respect to the mean phenotype. For the theta-logistic model of density dependence, evolution tends to maximize the expected value of N(θ).