The use of traditional Chinese medicine (TCM) residue as a crop culture substrate has unique advantages in alleviating the obstacles associated with continuous monocropping, such as increasing production, improving quality and alleviating pests and diseases. However, the effect of TCM residue application on substrates in continuous monocropping practices has not been determined. In this study, the cucumber variety “Jinyou No. 10” was used as the material, and fermented TCM residue, vermiculite and perlite were used as organic substrates (3:1:1). The cucumbers were cultivated on substrates for different durations of continuous monocropping, which were the first cropping cycle (A1), second cropping cycle (A2), third cropping cycle (A3) and fourth cropping cycle (A4). The control (A0) was the substrate sample without any crop planted in it. After the cucumbers were harvested, substrate samples (areas around the cucumber roots) were collected. The physiochemical properties of the cultivated substrates were determined, and the microbial community structures were analyzed through 16S rRNA and ITS sequencing. The physiochemical indices of the substrates with different durations of continuous monocropping (A1–A4) were significantly different than those of the control (A0) substrate. Moreover, the continuous cropping of cucumber had greater effects on fungal communities than on bacterial communities. Bacterial community structure analysis revealed a greater proportion of important bacterial taxa (Proteobacteria, Chloroflexi, and Nitrospirae) in the continuous monocropping substrates than in the A0 substrate. For the fungal community, Ascomycota accounted for the largest percentage of the fungal community in all the samples. The diversity of the microbial community was found to be influenced primarily by electrical conductivity, organic matter content, pH and total potassium content according to the correlation analysis of physicochemical properties and relative abundance of the microbial community. Our study would provide a basis for addressing persistent challenges in continuous cropping and for obtaining the utmost benefit from using TCM organic residue waste.