Reductive soil disinfestation can effectively alleviate continuous cropping obstacles. The effects of mixing mushroom residues and carbon nanotubes on the structure and function of soil microbial communities and self-toxic substances in Lilium brownii var are still unclear. We evaluated the nature of different soil treatments on soil physicochemical properties, microbial community structural response, and the impact of self-toxic substances. Compared with the compound fertilizer treatment, both organic fertilizer and mushroom residues treatments improved soil pH to 7.06 and 6.57, respectively. Carbon nanotubes treatment increased the relative abundance of Acidobacteriota by approximately 3.96%, although it could not significantly affect the soil pH. The mushroom residues flooded cover film treatment increased the soil pH to 6.75, replenished soil elements, and increased the relative abundance of Verrucomicrobiota and Campylobacterota by 1.62% and 1.79%, respectively. Carbon nanotubes and mushroom residues flooded cover film treatment significantly increased the diversity of the bacterial community. The relative abundances of Acidobacteriota, Verrucomicrobiota, Actinobacteria, and Chloroflexi increased by 2.4%, 1.39%, 0.80%, and 0.53%, respectively. Additionally, the minimum number of self-toxic substances was detected through GC–MS analysis. The results of this study showed that mushroom residues flooded cover film treatment could directly improve the soil microbial community structure by changing the physicochemical properties of the soil, and mixed carbon nanotubes further adsorbed the self-toxic substances. The species composition of fungal communities in the soil had been altered in a way by the different treatments, but the fungal diversity didn't change significantly. This research provides a theoretical basis for revealing the mechanism of continuous cropping obstacles in lily and offering better guidance for sustainable development in lily.