We have selected and analysed the properties of a sample of 2905 Ks <21.5 galaxies in ~131arcmin2 of the Great Observatories Origins Deep Survey (GOODS) Chandra Deep Field South (CDFS), to obtain further constraints on the evolution of Ks-selected galaxies with respect to the results already obtained in previous studies. We made use of the public deep multiwavelength imaging from the optical B through the infrared (IR) 4.5-μm bands, in conjunction with available spectroscopic and COMBO17 data in the CDFS, to construct an optimized redshift catalogue for our galaxy sample. We computed the Ks-band luminosity function and determined that its characteristic magnitude has a substantial brightening and a decreasing total density from z= 0 to = 2.5. We also analysed the colours and number density evolution of galaxies with different stellar masses. Within our sample, and in contrast to what is observed for less massive systems, the vast majority (~85-90 per cent) of the most massive (M > 2.5 × 1011Msolar) local galaxies appear to be in place before redshift z~ 1. Around 65-70 per cent of the total assemble between redshifts z= 1 and 3 and most of them display extremely red colours, suggesting that plausible star formation in these very massive systems should mainly proceed in obscured, short-time-scale bursts. The remaining fraction (up to ~20 per cent) could be in place at even higher redshifts z= 3-4, pushing the first epoch of formation of massive galaxies beyond the limits of current near-IR surveys.