Paphiopedilum micranthum, an IUCN Red List species, is discontinuously distributed in the karst limestone mountain of southwest China and exhibits ecological specialization, typically through lithophytic and terrestrial ecotypes. Whether the distribution of rhizosphere bacteria and fungi in these different habitats is random or reflects soil preferences requires further investigation. A total of 73 samples from the core distribution areas in China, representing all habitats in two sites, were analyzed for soil differences by comparing edaphic properties and microbial community structure based on high-throughput sequencing of bacterial 16S rRNA genes and fungal ITS region sequences, alongside soil physiochemical data. The results showed no significant differences in microbial community richness and diversity across the heterogeneous habitats. However, significant differences in taxa were observed across various habitats. Dominant bacterial phyla included Actinobacteriota, Proteobacteria and Acidobacteriota, with dominant genera such as Crossiella, Pseudonocardia, 67-14, Mycobacterium and RB41. The primary fungal phyla were Basidiomycota and Ascomycota, featuring prominent genera such as Phlegmacium, Archaeorhizomyces, Trechispora, and Lepiota. There were 16 bacterial genera and 13 fungal genera associated with nitrogen transformation and fixation. Alkali-hydrolyzed nitrogen (AN) was identified as a main driver of soil bacterial and fungal community variation. Based on an analysis of soil physicochemical properties, ammonium nitrogen content was consistently higher than nitrate nitrogen across different habitats. Furthermore, across all heterogeneous habitats, P. micranthum showed no significant differences in nitrate nitrogen, ammonium nitrogen, or their ratio. The nitrogen-use efficiency of P. micranthum ranged from 7.73% to 9.87%, with the highest efficiency observed in the terrestrial habitat of Shedu. These results suggest that P. micranthum prefers habitats rich in organic matter and nitrogen, showing a preference for ammonium nitrogen uptake in natural conditions. Heterogeneous habitats affect plant nitrogen-use efficiency as well as changes in microbial community composition.