The objective of this study was to deeply understand the adaptation mechanism of the functional traits of Moso bamboo Phyllostachys pubescens syn. edulis (Poales: Poaceae) leaves to the environment under different Pantana phyllostachysae Chao damage levels, analyzing the changes in the relationship between specific leaf area (SLA) and leaf dry matter content (LDMC). We combined different machine learning models (decision tree, RF, XGBoost, and CatBoost regression models), and used different canopy heights and different levels of infestation, to analyze the changes in the relationship between the two under different levels of infestation based on the results of the best estimation model. The results showed the following: (1) The SLA of Ph. pubescens showed a decreasing trend with the increase om insect pest degree, and LDMC showed an inverse trend. (2) The SLA of bamboo leaves was negatively correlated with the LDMC under different insect pest degrees; the correlation of the data under the healthy class was higher than that of other insect pest levels, and at the same time better than that of the full sample, which laterally confirmed the effect of insect pest stress on the functional traits of Ph. pubescens leaves. (3) When modeling under different infestation levels, the CatBoost model was used for heavy damage and the RF model was used for the rest of the cases; the decision tree regression model was used when modeling different canopy heights. The findings contribute certain insights into the nuanced responses and adaptive mechanisms of Ph. pubescens forests to environmental fluctuations. Moreover, these results furnish a robust scientific foundation, essential for ensuring the enduring sustainability of Ph. pubescens forest ecosystems.