Spatial memory supported by the hippocampus is a critical cognitive function in daily life. It helps us to navigate to salient goal locations. Hippocampal place cells stably represent the spatial location, while c-Fos-expressing cells (engram cells) contain rich information about the environment, contributing to the encoding and retrieving of memories. However, the role of cFos as a gateway to a more profound comprehension of the mechanisms underlying the process of goal-oriented spatial memory remained poorly understood. In this study, we labeled rats' c-Fos+ neurons by Channelrhodopsin-2 during memory encoding of a specific goal location. A subset of place cells whether they expressed c-Fos was identified optogenetically. As the rats learned the new goal locations, the spatial correlation between task periods remained stable for the c-Fos- place cell, while increased for the c-Fos+ place cell. This finding shed light on the processing of goal-oriented spatial memories by the hippocampal network involved in c-Fos. C-Fos- place cells consistently maintained a stable representation of the locations, while c-Fos+ place cells exhibited significant flexibility of the goal.