In the context of increasingly severe global environmental pollution, how to promote the harmonious development of enterprises, the ecological environment, and the public, and further improve the environmental performance of enterprises is an urgent problem to be solved. Drawing on resource-based theory and dynamic capability theory, this study conducted an empirical analysis using survey data from 451 enterprises in China. The results showed that green human resource management (GHRM) has a significant positive impact on corporate environmental performance, and corporate reputation and green dynamic capability have a dual mediating effect on the above relationship. In addition, top management environmental support positively moderates the direct relationship between GHRM and corporate reputation and green dynamic capability, and at the same time moderates the indirect effect of GHRM on corporate environmental performance through corporate reputation and green dynamic capability. From the perspective of resource (corporate reputation) and capability (green dynamic capability), this study examines the mechanism of GHRM and corporate environmental performance and provides an integrated framework for scholars to clarify the relationship between the two. It has important theoretical and practical significance for the sustainable development of enterprises.