The scientific community is becoming interesting in green synthesis since it is thought to be an environmentally friendly technique that produces no harmful waste and employs less toxic materials and solvents. Due to its simplicity and environmental friendliness compared to physical and chemical approaches, the use of plants to prepare metal and metal oxide nanoparticles has recently received a lot of attention. A flexible material for multiple uses, magnesium oxide nanoparticles (MgO-NPs) and magnesium chitosan composite were produced via green synthesis utilizing leaf extract. In order to make magnesium oxide nanoparticles (MgO-NPs) and magnesium chitosan composite, aqueous leaf extract of Eichhornia crassipes was used in this study. The FT-IR approach was used to establish the existence of functional groups in the synthesized MgO nanoparticles and Magnesium Chitosan Composite. An X-ray Diffraction (XRD) analysis was utilized to demonstrate the crystalline nature and size of the biosynthesized nanoparticle. The size, shape, and composition of greenly produced MgO nanoparticle and magnesium chitosan composite were confirmed using SEM with EDAX. The effect of gram positive (S. aureus) and gram negative (E. coli) bacteria on green synthesized MgO nanoparticles and magnesium chitosan composite was also investigated. Additionally, it was discovered that MgO nanoparticles significantly inhibit bacterial growth in both stains. This type of nanoparticle production makes it appropriate for antibacterial research. For the manufacture of magnesium oxide nanoparticles (MgO-NPs) and its composite in medical and environmental applications, green fabrication is a new and environmentally friendly process.