The principle of least action is arguably the most fundamental principle in physics as it can be used to derive the equations of motion in various branches of physics. However, this principle has not been experimentally demonstrated at the quantum level because the propagators for Feynman’s path integrals have never been observed. The propagator is a fundamental concept and contains various significant properties of a quantum system in the path integral formulation, so its experimental observation is itself essential in quantum mechanics. Here we theoretically propose and experimentally observe the propagators of single photons based on the method of directly measuring quantum wave functions. Furthermore, we obtain the classical trajectories of single photons in free space and in a harmonic trap based on the extremum of the observed propagators, thereby experimentally demonstrating the quantum principle of least action. Our work paves the way for experimentally exploring the fundamental problems of quantum theory in the formulation of path integrals.