ABSTRACT The introduction of leguminous crops for crop rotation can mitigate the negative effects of continuous cropping on soil health. In this experiment, we designed ten cropping patterns to optimise the rotation effect with different combinations of crop types, planting years, and order in a mainly potato-growing region. A 5-year cycle with three crops, undertaken in Inner Mongolia since 2009, was used to test soil properties and microbial structure. The relative abundance of plant growth-promoting bacteria (PGPB) was 32.1% in the cycle oats oats alfalfa alfalfa alfalfa and 22.4% in 5-year mono-cropping of alfalfa, which was higher than that of mono-cropping of potatoes and other crop rotations. Soil moisture was the main factor influencing bacterial and fungal communities. The effect of the type of plant introduced into the rotation on soil was greater than that of the number of years a certain crop was planted in the rotation, and this effect was greater than that of planting order. The findings suggest that the rotation of oats and alfalfa mixed → alfalfa → oats → potatoes → potatoes is a suitable 5-year cycle to maintain biodiversity and better soil physico-chemical properties for sustainable agriculture.