IntroductionCowpea (Vigna unguiculata [L.] Walp.) is an important grain legume in semiarid Africa, where it contributes to food security and livelihood resilience in smallholder farming systems. However, information on the soil bacterial microbiome associated with cowpea production in semiarid eastern Kenya remains limited.MethodsThis study investigated heterogeneity of soil physicochemical properties and bacterial community structure in cowpea farms from Machakos and Kitui Counties via 16S rRNA amplicon next-generation sequencing (NGS), with the aim of improving the understanding of belowground microbial patterns in these production systems.ResultsMost measured soil physicochemical properties varied significantly among farms, indicating substantial field-level heterogeneity, whereas county-level differences were less pronounced. Across all the samples, the bacterial communities were dominated by Actinomycetota, followed by Pseudomonadota, Bacillota, Chloroflexota, and Acidobacteriota. Rhizobial genera of agronomic relevance, including Bradyrhizobium, Rhizobium, Ensifer, and Mesorhizobium, were detected across farms, with Bradyrhizobium showing the highest relative abundance. The alpha-diversity indices varied among the samples, while the beta-diversity analysis revealed significant differences in the bacterial community composition between the counties. Preliminary correlation analysis revealed associations between selected soil variables and the distributions of dominant bacterial taxa and rhizobial genera, however none of these pairwise correlations remained significant after Benjamini-Hochberg FDR correction.DiscussionCowpea farm soils in semiarid eastern Kenya harbor compositionally distinct bacterial communities that vary with farm-level edaphic heterogeneity, with native rhizobial genera detected across all sites indicating ecologically relevant symbiotic bacterial resources; a direct test (Mantel test, constrained ordination) did not establish the measured soil variables as significant drivers of this compositional variation at the present sample size. These findings establish a baseline for soil bacterial ecology in Kenyan cowpea systems and demonstrate that site-specific, microbiome-informed strategies are needed for sustainable soil fertility management and effective deployment of native rhizobial inoculants in semiarid smallholder agriculture.