The mean free path of ionizing photons, λmfp, is a key factor in the photoionization of the intergalactic medium (IGM). At z ≳ 5, however, λmfp may be short enough that measurements towards QSOs are biased by the QSO proximity effect. We present new direct measurements of λmfp that address this bias and extend up to z ∼ 6 for the first time. Our measurements at z ∼ 5 are based on data from the Giant Gemini GMOS survey and new Keck LRIS observations of low-luminosity QSOs. At z ∼ 6 we use QSO spectra from Keck ESI and VLT X-Shooter. We measure $\lambda _{\rm mfp} = 9.09^{+1.62}_{-1.28}$ proper Mpc and $0.75^{+0.65}_{-0.45}$ proper Mpc (68 per cent confidence) at z = 5.1 and 6.0, respectively. The results at z = 5.1 are consistent with existing measurements, suggesting that bias from the proximity effect is minor at this redshift. At z = 6.0, however, we find that neglecting the proximity effect biases the result high by a factor of two or more. Our measurement at z = 6.0 falls well below extrapolations from lower redshifts, indicating rapid evolution in λmfp over 5 < z < 6. This evolution disfavors models in which reionization ended early enough that the IGM had time to fully relax hydrodynamically by z = 6, but is qualitatively consistent with models wherein reionization completed at z = 6 or even significantly later. Our mean free path results are most consistent with late reionization models wherein the IGM is still 20 per cent neutral at z = 6, although our measurement at z = 6.0 is even lower than these models prefer.