Unraveling the mechanisms of community assembly in different ecosystems is a central ecological issue. Soil depth, which is the predominant characteristic of karst regions, possibly affects community assembly from the regional species pool into local communities. However, the influence of karst soil depth on plant community assembly mechanisms remains unclear. We investigated the community functional traits of karst shrublands by calculating community-weighted mean (CWM) traits for leaf dry matter content (LDMC), specific leaf area (SLA), leaf carbon content (LCC), leaf nitrogen content (LNC), leaf phosphorus content (LPC), and leaf potassium content (LKC). To explore the assembly pattern of karst shrublands, we assessed the extent of trait divergence or convergence using trait-based null model analyses. Additionally, we examined how community functional traits and assembly patterns changed with varying local soil depths. Karst shrublands were found to exhibit CWM trait combinations characterized by high LDMC and LCC, as well as low SLA, LNC, LPC, and LKC to adapting to harsh environments. Furthermore, the CWM of LDMC, LCC, LCC/LNC ratio, and LCC/LPC ratio significantly decreased, while SLA and LNC in karst shrublands significantly increased along soil depth gradients. This indicates that, as soil conditions improved, the karst shrubland community shifted from a conservative survival strategy to a resource-acquisition strategy. Overall, the convergence pattern prevailed in the karst shrubland communities for most leaf traits. As the karst soil depth increased, the traits of the shrubland communities shifted from a convergence pattern toward a neutral assembly. These results demonstrate for the first time that species were primarily assembled into karst shrubland communities through environmental filtering, while the importance of environmental filtering in the assembly process gradually weakened with increasing soil depth. Our study underlines the necessity of increasing soil quantity to allow more species from the regional species pool to enter local shrublands, thereby promoting karst community succession.