The diurnal and seasonal variability of the mixed-layer height in urban areas has implications for ground-level air pollution and the meteorological conditions. Measurements of the backscatter of light pulses with a commercial lidar system were performed for a continuous period of almost six years between 2011 and 2016 in the southern part of Mexico City. The profiles were temporally and vertically smoothed, clouds were filtered out, and the mixed-layer height was determined with an ad hoc treatment of both the filtered and unfiltered profiles. The results are in agreement when compared with values of mixed-layer height reconstructed from, (i) radiosonde data, and (ii) surface and vertical column densities of a trace gas. The daily maxima of the mean mixed-layer height reach values $$> 3\hbox { km}$$ above ground level in the months of March–April, and are clearly lower ( $$< 2.7\hbox { km}$$ ) during the colder months from September–December. Mean daily minima are typically observed at 0700 local time (UTC − 6h), and are lowest during the winter months with values on average below 500 m. The data presented here show an anti-correlation between high-pollution episodes and the height of the mixed layer. The growth rate of the convective mixed-layer height has a seasonal behaviour, which is characterized together with the mixed-layer-height anomalies. A clear residual layer is evident from the backscattered signals recorded in days with specific atmospheric conditions, but also from the cloud-filtered mean diurnal profiles. The occasional presence of a residual layer results in an overestimation of the reported mixed-layer height during the night and early morning hours.