The study presents the development and optimization of a novel garlic straw-based composite hydrogel synthesized using electron beam irradiation for adsorption of common harmful organic pollutants like methylene blue dye (MB). The composite hydrogel was prepared from garlic straw (GS) mixed with (polyvinyl alcohol/Pectin) (PVA/Pt) copolymers using an eco-friendly technique of electron beam (EB) radiation for crosslinking. The synthesis process and parameters were optimized. The total PVA/Pt content 20wt% of composition 70/30 includes 20wt% GS at 35 kGy was chosen as the most suitable condition for optimization. The structure, morphology, and thermal properties were studied using different instruments. The resulting (PVA/Pt)-GS composite hydrogel exhibited excellent adsorption capacity for MB, showcased through comprehensive investigations of isotherms, kinetics, and thermodynamics. The maximum adsorption capacity of PVA/Pt-GS for MB was 505 mg/g at pH 9. Isotherm studies revealed the adsorption mechanism, while kinetic analyses provided insights into the adsorption rate. Thermodynamic investigations elucidated the spontaneity and feasibility of the adsorption process.