Research highlights: Ecological policies must balance ecosystem protection by promoting the sustainable livelihoods of farmers living in or near protected areas; however, the intrinsic motivations of farmers to adopt green production behaviors (GPBs) are poorly understood. Background and objectives: We explored how ecological policies affect the GPBs of farmers in agroforestry. Materials and methods: We conducted questionnaires of farmers in 11 counties of Sichuan Province, China, with abundant protected areas and large-scale agroforestry, after which a structural equation model of farmers’ ecological awareness, policy perception, and GPBs was constructed. Results: (1) Ecological policies can stimulate farmers’ GPBs by improving their ecological awareness, creating positive subjective norms, and inducing the “herd effect”. Increases in protection intensity and scope amplify the pressures on farmers to maintain more than long-term policy consistency. (2) Green production is more time-consuming, laborious, expensive, and difficult to learn compared with traditional production methods, which have somewhat limited GPBs adoption. (3) In the rural “acquaintance society”, information and communication from others have a substantial impact on farmers’ perceptions, attitudes, and behaviors; thus, positive subjective norms from formal and informal channels could promote GPB adoption. Conclusions: Future policies should prioritize environmental education over environmental publicity by helping farmers understand the long-term relationship between ecological protection and economic development, teaching individual environmental responsibility, enhancing positive feedback to farmers who adopt GPBs, actively exploring mechanisms for realizing the value of ecological products, and improving farmers’ management skills and learning ability.