Microencapsulation is one of the most important methods to enhance the survival of bacteria when exposed to various harsh conditions. The present study evaluated the viability of L. reuteri ATCC 23272 microencapsulated in polysaccharide-based bionanocomposite. Inulin, polydextrose, and pectin were utilized as prebiotics, and magnesium oxide nanoparticles (MgO NPs) as reinforcing agent in the microgel structure. The composition of bionanocomposite was optimized using the simplex-lattice mixture method. Bionanocomposite optimal formulation was achieved by combining 91.6 % inulin and 8.4 % pectin in the presence of MgO NPs. L. reuteri prebiotic score (1.33) and E. coli (1.08), extrusion efficiency (97.57 %), viability after drying (99.37 %), and viability in simulated gastrointestinal conditions (SGI) (91.74 %) were obtained. Not using MgO NPs in the optimal composite structure caused a decrease of 2.14 log CFU/g in SGI. During 28 days of storage of bacteria at 4 and 25 °C, respectively, a reduction of 2.56 and 3.04 log CFU/g was observed for free cells compared to encapsulated cells. SEM, FTIR, and XRD analyses were performed on ingredients and microcapsules with and without bacteria. The results exhibited that the optimal bionanocomposite could be used as a beneficial encapsulation system to improve the performance of probiotics in harsh conditions.