We report the direct observation of optical precursors of heralded single photons with step- and square-modulated wave packets passing through cold atoms. Using electromagnetically induced transparency and the slow-light effect, we separate the single-photon precursor, which always travels at the speed of light in vacuum, from its delayed main wave packet. In the two-level superluminal medium, our result suggests that the causality holds for a single photon.