Phosphorus (P) cycling is a fundamental process driven by microorganisms, and plants can regulate P cycling directly or via their influence on the soil microbial community. However, the differential P cycling patterns associated with legumes and grass are largely unknown. Therefore, we investigated the microbial community involved in P cycling in subtropical soil grown with stylo (Stylosanthes guianensis, legume) or bahiagrass (Paspalum notatum, grass) using metagenomic sequencing. P fractionation indicated that sparingly soluble inorganic P (Pi) accounted for approximately 75% of P pool. Bacteria involved in sparingly soluble Pi solubilization (pqq, gad, JEN) were more abundant in bahiagrass soil, with Candidatus Pelagibacter, Trichodesmium, Neorickettsia, Nitrobacter, Paraburkholderia, Candidatus Solibacter, Burkholderia as major contributors. In contrast, bacteria involved in organic P (Po) mineralization (php, glpQ, phn) were more abundant in stylo soil, consistent with phosphatase activity and Frankia, Kyrpidia, Thermobispora, Streptomyces, Rhodococcus were major contributors. Bacteria taking up low molecular-weight Po were more abundant in stylo soil than in bahiagrass soil, while those taking up Pi were less abundant. These data suggest that bacterial communities associated with legumes and grass develop contrasting P acquisition strategies, highlighting the possibility of intercropping with legumes and grass for better P cycling.