The interaction between free electrons and light stands at the base of both classical and quantum physics, with applications in free-electron acceleration, radiation sources, and electron microscopy. Yet to this day, all experiments involving free-electron–light interactions are fully explained by describing the light as a classical wave. We observed quantum statistics effects of photons on free-electron–light interactions. We demonstrate interactions that pass continuously from Poissonian to super-Poissonian and up to thermal statistics, revealing a transition from quantum walk to classical random walk on the free-electron energy ladder. The electron walker serves as the probe in nondestructive quantum detection, measuring the second-order photon-correlation g(2)(0) and higher-orders g(n)(0). Unlike conventional quantum-optical detectors, the electron can perform both quantum weak measurements and projective measurements by evolving into an entangled joint state with the photons. These findings inspire hitherto inaccessible concepts in quantum optics, including free-electron–based ultrafast quantum tomography of light.