BackgroundTian-ma (Gastrodia elata) is a traditional medicinal herb found in China. It is used in healthy food and to treat various diseases, therefore cultivated extensively in southwest China. However, continuous cropping of this species has led to various obstacles, such as microbial disease and pest infestation, significantly affecting the production and development of valuable medicinal and food resources. As per the growth habit, soil is presumed to be the primary factor contributing to these obstacles, despite the known issues of continuous cropping obstacles in Gastrodia elata, such as microbial disease, there is a lack of comprehensive understanding of the specific soil bacterial communities and metabolites involved in these processes.MethodsWe analyzed soil samples collected during the year of Tian-ma cultivation (0 Year), after the Tian-ma harvest (1 Year), after two years (2 Year), and three years (3 Year) of fallowing post-cultivation using soil 16S rRNA metabarcoding sequencing by illumina platform and metabolomics (GC–MS/MS). Soil sample collected from the uncultivated field was used as the control (CK).ResultsMetabarcoding sequencing showed high bacterial alpha diversity during the cultivation of Tian-ma (0 Year) and the period of deterioration of soil bacterial community. (1 Year), with decreased anaerobic bacterial abundance and increased copiotrophic bacterial abundance. Bacteria associated with sulfur metabolism also showed increased abundance during the year of cropping obstacles. Further metabolomics approach identified 4-hydroxy-benzenemethanol as an indicator of Tian-ma continuous cropping obstacles. Besides, metabolites of the carbohydrate class were found to be the most abundant during the occurrence of continuous cropping obstacles of Gastrodia elata, suggesting that regulation of soil microbial diversity may be a critical factor in addressing these obstacles. Finally, the correlation analysis indicated a positive association between the abundance of some metabolite, e.g., carbamic acid, N-(2-butyl)-N-octadecyl-, ethyl ester detected after Tian-ma cultivation and the abundance of bacteria capable of degrading toxic metabolites, such as Massilia, Burkholderia-Caballeronia-Paraburkholderia, and Dyella.ConclusionThis study has revealed the specific soil bacteria and metabolic factors related to the continuous cropping obstacles of Gastrodia elata. These findings not only deepen our understanding of the continuous cropping issues but also pave the way for developing effective strategies to overcome them.