Legumes enhance pasture health and soil productivity by fixing atmospheric nitrogen and boosting soil microbiota. We investigated the effects of tropical pasture legumes, including butterfly pea (Clitoria ternatea), seca stylo (Stylosanthes scabra), desmanthus (Desmanthus virgatus), lablab (Lablab purpureus), and Wynn cassia (Chamaecrista rotundifolia), on the soil microbial community and buffel grass (Cenchrus ciliaris) gene expression. Additionally, we explored the impact of a phytogenic bioactive product (PHY) in the coculture system. A pot trial using soil enriched with cow paunch compost included four treatments: monoculture of buffel grass and five legume species with and without PHY supplementation and coculture of buffel grass with each legume species with and without PHY supplementation. Actinobacteriota and Firmicutes were the dominant bacterial phyla. Regardless of PHY application, the coculture of buffel grass with legumes positively influenced microbial composition and diversity. Transcriptomic analysis revealed significant gene expression changes in buffel grass shoots and roots, with each legume uniquely affecting nitrogen metabolism. Lablab and Wynn cassia exhibited similarities in modulating metabolic processes, butterfly pea contributed to mycotoxin detoxification, and desmanthus balanced cell death and growth. Seca stylo enhanced root cell growth and regeneration. These findings offer insights for optimizing legume–grass coculture systems, enhancing soil activity and promoting sustainable agriculture.