The ability of a moving observer to accurately perceive their heading direction is essential for effective locomotion and balance control. While previous studies have shown that observers integrate visual and vestibular signals collected during movement, it remains unclear whether and how observers use visual signals collected before their movement to perceive heading direction. Here we investigate the effect of environmental motion that occurred ahead of self-motion on the perception of self-motion. Human observers sat on a motion platform, viewed visual motion stimuli, and then reported their perceived heading after the platform moved. The results reveal that environmental motion presented before the observers' movement significantly modulates their heading perception. We account for this effect using a normative computational model that takes into account the causal relationship between visual signals generated before and during the observers' movement. Overall, our study highlights the crucial role of environmental motion presented before self-motion in heading perception, broadening the current perspective on the computational mechanisms behind heading estimation.