Floodplains have important ecological and hydrological functions in terrestrial ecosystems, experience severe soil erosion, and are vulnerable to losing soil fertility. Tamarix chinensis Lour. plantation is the main vegetation restoration measure for maintaining soil quality in floodplains. Soil microorganisms are essential for driving biogeochemical cycling processes. However, the effects of sampling location and shrub patch size on soil microbial community composition remain unclear. In this study, we characterized changes in microbial structure, as well as the factors driving them, in inside- and outside-canopy soils of three patch sizes (small, medium, large) of T. chinensis plants in the middle Yellow River floodplain. Compared with the outside-canopy soils, inside-canopy had higher microbial phospholipid fatty acids (PLFAs), including fungi, bacteria, Gram-positive bacteria (GP), Gram-negative bacteria (GN), and arbuscular mycorrhizal fungi. The ratio of fungi to bacteria and GP to GN gradually decreased as shrub patch size increased. Differences between inside-canopy and outside-canopy soils in soil nutrients (organic matter, total nitrogen, and available phosphorus) and soil salt content increased by 59.73%, 40.75%, 34.41%, and 110.08% from small to large shrub patch size. Changes in microbial community composition were mainly driven by variation in soil organic matter, which accounted for 61.90% of the variation in inside-canopy soils. Resource islands could alter microbial community structure, and this effect was stronger when shrub patch size was large. The results indicated that T. chinensis plantations enhanced the soil nutrient contents (organic matter, total nitrogen, and available phosphorus) and elevated soil microbial biomass and changed microbial community composition; T. chinensis plantations might thus provide a suitable approach for restoring degraded floodplain ecosystems.