Based on fieldwork and text analysis of interviews with residents in the Shanhaiguan section of the Great Wall of China, this study uses qualitative methods to examine residents' narratives on memory, identity, and place attachment in heritage contexts. Guided by the theory of topophilia, the analysis focuses on three dimensions: residents' sensory perceptions, cognitive attitudes, and emotional values. These dimensions reveal the relationship between memory transmission, identity formation, and responsibility-driven actions. Findings show that layered identities emerge through memory practices, reinforced by personal and collective narratives. Residents' strong topophilia enhances their commitment to heritage preservation. Interactions with tourists integrate local memory and identity into heritage protection and tourism development, providing momentum for sustainability. This study advances the understanding of human-place relationships in heritage sites through the lens of topophilia. It highlights residents' agency in heritage protection and offers insights into sustainable development through community engagement.