In this study, an in situ immersion loading method is employed to introduce graphene oxide (GO) nanosheets and hollow copper ferrite nanospheres into the ordered porous structure of alkali-activated corn stalk (CS). This approach facilitates the construction of a novel magnetic three-dimensional composite sponge (GO/CS/CuFe2O4) utilized for the efficient removal of methylene blue (MB) and malachite green (MG) dyes from wastewater samples. In this hybrid adsorbent, the stacking of GO nanosheets is inhibited due to the ordered porous structure of CS, based on which GO nanosheets are well immobilized and dispersed. In addition, the hollow CuFe2O4 nanospheres and GO nanosheets support each other, further reducing the accumulation of GO, and increasing the specific surface area of the adsorbent. The engineered morphology of GO/CS/CuFe2O4 sponges supports the maximum exposure of the active adsorption sites to the dye solution, promoting the adsorption process. Microscopy and surface analyses show that GO/CS/CuFe2O4 sponges have a rich pore structure with the specific surface area of 289.85 m2·g−1, more than 17 times higher than that of CS, significantly improving their adsorption performance for MB and MG. The maximum adsorption capacity of GO/CS/CuFe2O4 for MB and MG is as high as 243.65 and 231.53 mg/g, respectively, superior to those of many other biomass-based adsorbents. The dye adsorption performance of GO/CS/CuFe2O4 can be well described by the Langmuir adsorption isotherm and pseudo-second-order kinetic model, suggesting the existence of strong monolayer chemisorption. The FTIR and X-ray photoelectron spectroscopy (XPS) analyses show that the dye removal mechanisms observed mainly includ π-π interactions, hydrogen bonding, electrostatic interactions and pore filling. In addition, GO/CS/CuFe2O4 sponges exhibit an excellent magnetic behavior (Ms = 49.52 emu/g), enabling the adsorbent to be recycled by the application of a magnetic field. The adsorption capacities of the adsorbent for MB and MG remain 88.6 % and 90.2 % of the initial adsorption capacity, respectively, even after 10 regeneration cycles, showing its excellent reusability performance. Finally, GO/CS/CuFe2O4 is applied for the removal of MB and MG from real aqueous environments comprising the seawater, tap water and wastewater treatment plant effluent, and the removal rates are observed to be over 90 % of that achieved in deionized water. This study provides new concepts for the sustainable utilization of agricultural waste and natural structure of plants to purify dye containing wastewater.