This study advances the debate on the strategic role of Environmental, Social, and Governance (ESG) performance by examining its moderating effect on the relationship between research and development (R&D) investment and firm performance. While prior research has largely examined R&D investment and ESG performance independently, often within single-country or single-industry contexts, this study uses an integrative, multi-theoretical perspective drawing on agency theory, stakeholder theory, and resource-based theory. Using a panel dataset of 6,600 firm-year observations from high-tech industries across Europe and the US (2016-2023), our results show that R&D investment exerts a negative short-term but positive lagged impact on firm performance. ESG performance directly enhances firm performance and significantly moderates the R&D-performance relationship by mitigating short-term inefficiencies and agency costs. These findings remain robust across alternative variable specifications, lag structures, and dynamic panel estimations using the system GMM approach. Heterogeneity analysis reveals that the moderating effect of ESG performance is more pronounced in the information technology sector and among European firms, while comparatively weaker in the healthcare, communication services, and in the US. Disaggregated analysis further shows that environmental and governance dimensions are particularly effective in offsetting the short-term costs of R&D investment, while the social dimension is less influential, underscoring the multidimensional nature of ESG performance. Overall, our study provides insights into ESG performance as a strategic enabler that enhances the effectiveness of R&D investment and clarifies when and how R&D investment creates value in the short term.