Endophytic plant growth promoting rhizobacteria (PGPRs) could replace chemical fertilizers in sustainable agriculture. Unfortunately, they are susceptible to harsh environmental conditions. Here, we proposed a polymeric hydrogel (PMH) consisting of carboxymethyl chitosan, sodium alginate, and calcium chloride for loading and protecting endophytic PGPR. This hydrogel can load endophytic PGPRs to not only boost its growth-promoting efficiency, but also help them adapt more effectively to environments. Using endophytic PGPR Ensifer C5 as model bacteria and Brasscia napus as host, we demonstrate that the PMH facilitate the colonization of endophytic PGPRs in the apical and lateral root primordia regions. Further analysis indicates that the PMH modulate suberin deposition of the endodermal cell layers and regulate the accumulation of auxin at the root tip. Meanwhile, PMH enhances the antioxidant capacity and disease resistance properties of plants by increasing the content of arachidonic acid metabolism intermediates in the plant. Importantly, the combination of PMH and endophytic PGPRs increases the yields of B. napus by approximately 30% in the field. Furthermore, PMH attenuates the loss of endophytic PGPR activity in the acidic environments. Overall, this microbial encapsulation strategy is a promising way to protect fragile endophytic microorganisms, providing attractive avenues in sustainable agriculture. Plant growth promoting rhizobacteria can replace chemical fertilizers, but they are susceptible to harsh environmental conditions. Here, the authors report on a protective hydrogel for promoting rhizobacteria colonization to enhance growth and improve adaptability of plants to acidic soil.