Functionalized biochars are crucial for simultaneous soil remediation and safe agricultural production. However, a comprehensive understanding of the remediation mechanism and crop safety is imperative. In this work, the all-in-one biochars loaded with a Bacillus aryabhattai (B10) were developed via physisorption (BBC) and sodium alginate embedding (EBC) for simultaneous toxic As and Cd stabilization in soil. The bacteria-loaded biochar composites significantly decreased exchangeable As and Cd fractions in co-contaminated soil, with enhanced residual fractions. Heavy metal bioavailability analysis showed a maximum CaCl2-As concentration decline of 63.51% and a CaCl2-Cd decline of 50.96%. At a 3% dosage of composite, rhizosphere soil showed improved organic matter, cation exchange capacity, and enzyme activity. The aboveground portion of water spinach grown in pots was edible, with final As and Cd contents (0.347 and 0.075 mg·kg⁻¹, respectively) meeting food safety standards. Microbial analysis revealed the composite's influence on the rhizosphere microbial community, favoring beneficial bacteria and reducing plant pathogenic fungi. Additionally, it increased functional microorganisms with heavy metal-resistant genes, limiting metal migration in plants and favoring its growth. Our research highlights an effective strategy for simultaneous As and Cd immobilization in soil and inhibition of heavy metal accumulation in vegetables.