The underground forests developed on inverted stone slopes in degraded karst tiankengs are important areas for biodiversity conservation, but the microbial community profiles have not been sufficiently characterized. Thus, we investigated the soil microbial communities at four sites (at the bottom of the slope (BS), in the middle of the slope (MS), in the upper part of the slope (US) and outside the tiankeng (OT)) in the Shenxiantang tiankeng. The dominant phyla in the inverted stone slope were Proteobacteria, Actinobacteria, and Acidobacteria, and the relative abundance were different in different slope positions. The Shannon–Wiener diversity index of the microbial community was significantly greater for the US site than for the MS or BS sites. The metabolism functional pathways (including C/N cycle) were more abundant at the BS site. Total nitrogen and pH were the dominant factors in determining the distribution of the microbial community along an inverted stone slope. These results suggest that topographic heterogeneity can influence the variations in the soil microbial structure, diversity, and function in degraded karst tiankengs and emphasized the ecological value of inverted stone slopes within karst tiankengs.