In this article, modified κ-carrageenan hydrogel nanocomposites were synthesized to increase the release ability of carrageenan hydrogels under gastrointestinal conditions. The effect of MgO nanoparticle loading in a model drug (methylene blue) release is investigated. Characterization of hydrogels were carried out using Fourier transform infrared spectroscopy (FTIR), X-ray diffraction (XRD), Field Emission Scanning Electron Microscope (FESEM) and Differential Scanning Calorimetry (DSC). Genipin was used to increase the delivery performance in gastrointestinal tract delivery by decreasing release in simulated stomach conditions and increasing release in simulated intestine conditions. It is shown that the amount of methylene blue released from genipin-cross-linked nanocomposites can be 67.5% higher in intestine medium and 56% lower in the stomach compared to κ-carrageenan hydrogel. It was found that by changing the nanoparticle loading and genipin concentration in the composite, the amount of drug released can be monitored. Therefore, applying nanoparticles appears to be a potential strategy to develop controlled drug delivery especially in gastrointestinal tract studies.