The present study was a six‐year long‐term positioning experiment to explore the microbial community structure in the soil of spring maize under different cultivation techniques in rainfed areas. Five treatments were designed as follows: no fertilizer (CK); 135 kg ha‐1 N and 90 kg ha‐1 P under straw mulching (SM); plastic mulching (PM); ridge‐furrow with plastic film mulching (RFPFM) and green manure (GM). The results revealed that Actinobacteria (24%‐33%), Proteobacteria (23.6%‐33.4%), Acidobacteria (12.8%‐18%) and Firmicutes (0.6%‐3%) were the dominant phyla in different soil layers. The relative abundance (RA) of Actinobacteria in the surface soil layer (0–20 cm) of CK and GM (33.48% and 32.08%) was higher than that in the other treatments. Proteobacteria was richer at 0–20 cm than at 20–40 cm in all treatments. The RA of Proteobacteria in RFPFM (33.43%) was significantly (p < .05) greater than that in the other treatments, and the RA of Firmicutes (3.0%) in the RFPFM treatment at 20–40 cm was significantly (p < .05) greater. Chryseobacterium, Lactobacillus, Bacillus and Altererythrobacter were the dominant genera in PM, SM, GM and RFPFM, respectively. Solirubrobacter preferred soil with stable aggregates and was the dominant genus in the control treatment. The findings of this study demonstrated that changes in soil bacterial RA and community composition were significantly affected by mulching treatment.