Based on social exchange theory, this study constructs a "community participation-experience quality" model to explore how community participation influences ecotourism experience quality and examines the moderating pathways of local identity. Theoretical analysis revealed that: (1) Community participation significantly enhances the functional, emotional, and meaningful dimensions of ecotourism experiences through the accumulation of social capital and emotional bonds; (2) Local identity amplifies the positive effect of community participation on experience quality; (3) Social capital and emotional connections mediate the relationship between community participation and experience quality. The theoretical contribution lies in integrating social exchange theory with the local identity framework, uncovering the dual driving mechanisms of community agencies in ecotourism development. Practically, ecotourism communities are advised to adopt participatory governance models, enhance host-guest interactions through resource-sharing platforms and cultural empathy activities, and strengthen identity cultivation via local memory narratives, thereby fostering a "community empowerment-value co-creation" sustainable development path. This research provides innovative strategies for optimizing ecotourism experiences and empowering community-driven growth.