Aims Biodiversity is important for maintaining multiple ecosystem functions and enhancing community resilience to disturbance.Selection effect and niche complementarity effect are two widely discussed mechanisms for maintaining ecosystem function,but the understanding of how these two mechanisms maintain forest ecosystem multifunctionality(EMF)under climate change is still limited.It is essential to deepen our understanding of these mechanisms,particularly in assessing whether there are differences in their effectiveness across different climatic zones.Methods Based on plots distributed in natural forests of middle temperate and cold temperate zones in northeastern China,we used functional trait diversity(FDq=0),single and multidimensional trait functional dispersion indices(FDis)to represent the niche complementarity effect,and community weighted mean trait values(CWM)to represent the selection effect.We also explored the driving force of EMF to climate change by using multivariate linear models and partial least squares path modeling(PLS-PM;structural equation model).Important findings(1)In middle temperate forests,two attributes of biodiversity(tree species diversity(SR)and FDq=0)had significant positive effects on EMF,and FDq=0 had stronger effects than SR.In cold temperate forests,no significant relationship between biodiversity and EMF(BEMF)was found.(2)In middle temperate forest communities,the effects of SR on EMF were mediated by trait differences and community weighted mean maximum tree height(CWMHmax)value.Both selection effect and niche complementarity effect simultaneously maintained EMF in middle temperate forests,with selection effect slightly higher than complementarity effect.CWMHmax was the main biotic factor influencing cold temperate forest EMF,and selection effect was the main driving force on EMF in these forests.SR and trait differences did not have a significant promoting effect on EMF.(3)Due to the"insurance effect"of biodiversity,middle temperate forests had a stronger resistance to climate change.Climate factors had no significant impact on SR,trait differences,CWMHmax and EMF.However,cold temperate forests were sensitive to climate change,and climatic factors were important abiotic factors affecting EMF.Higher annual mean air temperature and precipitation significantly altered community trait composition(e.g.,CWMHmax),diluting the contribution of species with high competitiveness and fitness traits(e.g.,maximum tree height(Hmax)trait)to ecosystem functions,and reducing the strength of the selection effect.This study highlights the importance of biodiversity for maintaining forest EMF,and demonstrates that both selection effect and complementarity effect are driving forces for temperate forest EMF in northeastern China.