In this investigation, we produced pH-responsive hydrogels for the controlled release of drugs by graft copolymerizing Gum ghatti and acrylic acid (AA) in an aqueous medium. N, N′-methylene-bis-acrylamide (MBA) and ammonium persulphate (APS) served as cross-linkers during the synthesis process. Our research explores the integration of cobalt ferrite (CoFe2O4) magnetic nanoparticles (CFMNPs) in delivering a combination drug comprising metformin hydrochloride and sodium diclofenac. The diverse applications of CoFe2O4 nanoparticles have driven the exploration of innovative and environmentally sustainable production methods. The development of novel materials for nanoparticle synthesis adheres to the principles of “Green Chemistry” through a co-precipitation technique. Characterization of the cross-linked hydrogels involved Fourier transform infrared spectroscopy (FT-IR) and X-ray diffraction (XRD) analyses. In vitro drug release kinetics were observed under physiological conditions using Ultraviolet–Visible Spectroscopy. The drug-loaded Gg-cl-poly(AA)/CoFe2O4 hydrogels exhibited a sustained drug release profile over 24 h, with significant release occurring at a pH of 4. To comprehend the drug release mechanism, we employed kinetic modeling, encompassing Zero order, First order, Higuchi model, Hixson-Crowell model, and Korsmeyer-Peppas model, for all developed hydrogels. The findings indicated that the drug release mechanism from the hydrogels followed the Korsmeyer-Peppas model. The study concludes that the developed hydrogel offers a promising solution for the controlled administration of metformin hydrochloride and diclofenac sodium.Graphical