The capacity of living cells to sense their population density and to migrate accordingly is essential for the regulation of many physiological processes. However, the mechanisms used to achieve such functions are poorly known. Here, based on the analysis of multiple trajectories of vegetative <i>Dictyostelium discoideum</i> cells, we investigate such a system extensively. We show that the cells secrete a high-molecular-weight quorum-sensing factor (QSF) in their medium. This extracellular signal induces, in turn, a reduction of the cell movements, in particular, through the downregulation of a mode of motility with high persistence time. This response appears independent of cAMP and involves a G-protein-dependent pathway. Using a mathematical analysis of the cells' response function, we evidence a negative feedback on the QSF secretion, which unveils a powerful generic mechanism for the cells to detect when they exceed a density threshold. Altogether, our results provide a comprehensive and dynamical view of this system enabling cells in a scattered population to adapt their motion to their neighbours without physical contact