In the present study, Fe3O4/poly(2-hydroxyethyl methacrylate-co-itaconic acid) magnetic hydrogels (MHGs) were prepared by in situ synthesis of Fe3O4 magnetic particles in hydrogels (HGs). The resulting magnetic hydrogels were characterized by Fourier transform infrared spectroscopy (FT-IR), X-ray diffraction (XRD), thermogravimetric analysis (TGA), a vibrating sample magnetometer (VSM), scanning electron microscopy (SEM), and N2 adsorption–desorption. The effect of Fe3O4 on the swelling behavior and adsorption of methylene blue (MB) dye of the prepared hydrogel was studied. Parameters such as the dose, pH, contact time, and MB initial concentration were investigated. The results show that 75% (HG) and 91% (MHG) of MB (200 mg/L) were removed at doses of 2 mg/mL and 1 mg/mL, respectively, under a pH of 6.8 and a contact time of 10 min. The adsorption behavior followed the Langmuir isotherm model, indicating that the adsorption process takes place in monolayers and on homogeneous surfaces. The Langmuir capacities for MB adsorption using the HGs and MHGs were 78 and 174 mg/g, respectively. The adsorption kinetics followed a pseudo-second-order kinetic model. In addition, thermodynamic studies carried out show that the adsorption process is spontaneous and endothermic. Adsorption–desorption studies indicate that the magnetic hydrogel can remove MB for four cycles with removal efficiencies above 90%. Therefore, a MHG is suitable as an alternative material for MB adsorption.