It is well-known that dispersal is advantageous in many different ecological situations, e.g. to survive local catastrophes where populations live in spatially and temporally heterogeneous habitats. However, the key question, what kind of dispersal strategy is optimal in a particular situation, has remained unanswered. We studied the evolution of density-dependent dispersal in a coupled map lattice model, where the population dynamics are perturbed by external environmental noise. We used a very flexible dispersal function to enable evolution to select from practically all possible types of monotonous density-dependent dispersal functions. We treated the parameters of the dispersal function as continuously changing phenotypic traits. The evolutionary stable dispersal strategies were investigated by numerical simulations. We pointed out that irrespective of the cost of dispersal and the strength of environmental noise, this strategy leads to a very weak dispersal below a threshold density, and dispersal rate increases in an accelerating manner above this threshold. Decreasing the cost of dispersal increases the skewness of the population density distribution, while increasing the environmental noise causes more pronounced bimodality in this distribution. In case of positive temporal autocorrelation of the environmental noise, there is no dispersal below the threshold, and only low dispersal below it, on the other hand with negative autocorrelation practically all individual disperses above the threshold. We found our results to be in good concordance with empirical observations.