Natural vegetation protects, maintains, and improves the environment through its ecological functions and is, thus, an important component of Earth’s ecosystems. The distribution of natural vegetation and its corresponding ecological roles vary with the topographic gradient. Understanding this role is essential for effective ecosystem management and conservation efforts. This study analyzes vegetation composition across altitude gradients and the spatiotemporal evolution of water conservation, soil conservation, and carbon storage in the southern hill and mountain belt of China. We then explored the drivers of the ecological functions of vegetation at different altitude gradients. The results showed that water conservation increased by 108.56%, soil conservation increased by 97.04%, and carbon storage increased only slightly. The ecological functions of vegetation varied across altitude gradients, with the 500–800 m gradient exhibiting markedly higher ecological functions than the other gradients. The effect of precipitation on soil conservation increases with altitude. In addition, at higher altitudes, evergreen coniferous forests had a greater effect on carbon storage. Based on the results, we propose vegetation management measures for different altitudes. This study provides a reference for decision-makers to develop and adjust ecological restoration programs in mountainous areas for the improvement of the local ecological environment.