We present the angular correlation function of the X-ray population of 1063 XMM-Newton observations at high Galactic latitudes, comprising up to ~30000 sources over a sky area of ~125 sq. degrees in the energy bands: soft (0.5-2 keV) and hard (2-10 keV). This is the largest sample of serendipitous X-ray sources ever used for clustering analysis purposes to date and the results have been determined with unprecedented accuracy. We detect significant clustering signals in the soft and hard bands (~10 sigma and ~5 sigma, respectively). We deproject the angular correlation function via Limbers equation and calculate the typical spatial lengths. We infer that AGN at redshifts ~1 are embedded in dark matter halos with typical masses of log M ~ 12.6/h Msol and lifetimes in the range ~3-5 x 10^8 years, which indicates that AGN activity is a transient phase in the life of galaxies.