Topological materials are capable of inherently robust transport and propagation of physical fields against disorder and perturbations, holding the promise of revolutionary technologies in a wide spectrum. Higher-order topological insulators are recently predicted as topological phases beyond the standard bulk-edge correspondence principle, however, their topological invariants have been proven very challenging to observe, even not possible yet by indirect ways. Here, we demonstrate theoretically and experimentally that the topological invariants in two-dimensional systems can be directly revealed in real space by measuring single-photon bulk dynamics. By freely writing photonic lattices with femtosecond laser, we construct and identify the predicted second-order topological insulators, as well as first-order topological insulators with fractional topological winding number. Furthermore, we show that the accumulation and statistics on individual single-particle registrations can eventually lead to the same results of light waves, despite the fact that the development of topological physics was originally based on wave theories, sharing the same spirit of wave-particle nature in quantum mechanics. Our results offer a direct fashion of observing topological phases in two-dimensional systems and may inspire topologically protected artificial devices in high-order topology, high-dimension and quantum regime.