We present a clustering analysis of QSOs using over 20000 objects from the final catalogue of the 2dF QSO Redshift Survey (2QZ), measuring the z-space correlation function, xi(s). When averaged over the range 0.3<z<2.2 we find that xi(s) is flat on small scales, steepening on scales above ~25h-1Mpc. In a WMAP/2dF cosmology we find a best fit power law with s_0=5.48+0.42-0.48h-1Mpc and gamma=1.20+-0.10 on scales s=1-25h-1Mpc. A CDM model assuming WMAP/2dF cosmological parameters is a good description of the QSO xi(s) after accounting for non-linear clustering and z-space distortions, and a linear bias of b_qso(z=1.35)=2.02+-0.07. We subdivide the 2QZ into 10 redshift intervals from z=0.53 to 2.48 and find a significant increase in clustering amplitude at high redshift in the WMAP/2dF cosmology. We derive the bias of the QSOs which is a strong function of redshift with b_qso(z=0.53)=1.13+-0.18 and b_qso(z=2.48)=4.24+-0.53. We use these bias values to derive the mean dark matter halo (DMH) mass occupied by the QSOs. At all redshifts 2QZ QSOs inhabit approximately the same mass DMHs with M_DH=(3.0+-1.6)x10^12h-1M_sun, which is close to the characteristic mass in the Press-Schechter mass function, M*, at z=0. If the relation between black hole (BH) mass and M_DH or host velocity dispersion does not evolve, then we find that the accretion efficiency (L/L_edd) for L* QSOs is approximately constant with redshift. Thus the fading of the QSO population from z~2 to 0 appears to be due to less massive BHs being active at low redshift. We apply different methods to estimate, t_qso, the active lifetime of QSOs and constrain this to be in the range 4x10^6-6x10^8 years at z~2. (Abridged).