Ecological restoration and biodiversity are currently hot issues of global environmental concern. However, knowledge about the specific impacts of restoration duration on understory vegetation diversity remains limited. Therefore, this study comprehensive employed a spatial approach to compare the differences in understory plant diversity and species composition among secondary forests with varying ecological restoration ages (0, 10, 30, 60, and 90-year-old stands) in Huangfu Mountain National Forest Park. This methodology allowed us to clarify the key factors affecting the composition of the understory plant community and investigate the regulatory mechanisms influencing changes in understory plant diversity. The results showed that shrub Shannon’s index value, shrub evenness, herb Shannon’s index value, herb richness, and herb evenness were significantly affected by the years of restoration, with 10 years and 90 years being the highest and 60 years being the lowest. Substrate diversity was the main factor influencing plant diversity in the shrub layer. Overstory richness, soil C/N, soil C, soil N, soil bacterial Observed OTUs, soil bacterial Chao1, soil bacterial Pielou_e, and substrate diversity were the drivers of plant diversity in the herb layer. Overstory evenness had a direct effect (0.256) and an indirect effect (0.284) on herb evenness through light availability and fungal Simpson’s index value. Light availability directly negatively affected herb evenness (−0.360). In addition, 52.6% of the factors affecting the herb evenness index were from the arboreal layer evenness, light availability, and fungal Simpson’s index value. To sum up, moderate disturbance of the understory environment of natural secondary forests can be carried out after 10 years of restoration, which is more conducive to the increase of understory plant diversity. This comprehensive study provides a theoretical basis for formulating ecological restoration measures for secondary forests, particularly in understanding the optimal timing and nature of disturbance in the restoration process, reassuring the audience about the validity and reliability of the findings.