Environmental awareness serves as an intrinsic motivator for individuals' engagement in environmental protection behaviors, and social media platforms can foster such awareness. Drawing on the 2018 China General Social Survey data (CGSS 2018), this study employs non-parametric and semi-parametric approaches within the framework of marginal treatment effect (MTE) to examine the influence of WeChat usage on the environmental awareness of Chinese residents. The findings unveil significant heterogeneity in the impact of frequent WeChat usage on individuals' levels of environmental awareness. Through estimation of the average treatment effect, treatment group average treatment effect, and non-treatment group average treatment effect, the study reveals that WeChat exerts a stronger positive influence on the environmental awareness of residents with a high propensity for using the platform, while it has no discernible effect on the environmental awareness of residents with a low inclination to engage with WeChat. The growth of environmental knowledge facilitated by WeChat plays a crucial role in shaping environmental awareness. Furthermore, this research underscores the influence of real-life social network structures on information exchange within the WeChat platform in China. This observation suggests that WeChat transcends its role as a mere information transmission tool and becomes intricately woven into the social network fabric of its users, thus mirroring certain characteristics of information dissemination within offline social networks. These insights imply that targeted strategies can be devised to bolster residents' environmental awareness by capitalizing on the interconnectedness of real-life social networks and leveraging the information exchange potential of WeChat. By doing so, it is possible to enhance environmental protection endeavors and encourage more sustainable behaviors among individuals.