The main objective of this study is to examine the impact of green investment on environmental degradation in developing countries using machine learning-based estimation combined with robustness tests of static and dynamic panel data modeling techniques. The scope of this study covers 30 developing countries for 2009–2019. This study introduces a new index of environmental degradation that uses the entropy method and includes green gas emissions and deforestation. The study addresses trade openness, the quadratic shape of economic growth, and urbanization in the context of the Environmental Kuznets Curve Hypothesis (EKC) and the Ecological Modernization Theory (EMT), in addition to green investment. This study considers the kernel-based regularized least squares (KRLS) approach, the static panel technique Driscoll & Kraay standards error method, and a dynamic panel technique system generalized moment techniques. The empirical findings from the machine learning method show that green investment significantly reduces environmental degradation with a higher coefficient resulting from the static fixed effect estimation. The study also reveals that the main hypotheses, such as EKC and EMT, are confirmed by all estimation techniques. Based on the results, the study recommends that policymakers take pragmatic steps toward green investments and increase the financing of green energy initiatives to combat environmental degradation.