Malachite green is a triphenylmethane compound, which has a good effect on disease prevention and control in the breeding of aquatic products, but it is a prohibited drug because it is detrimental to human health. Owing to the low content of target malachite green and complex components in the actual sample, simultaneously achieving good enrichment, high sensitivity, convenience, and rapidity detecting is difficult. Metal-organic framework (MOF) has a multidimensional network structure, good stability, and large specific surface area, and has broad application prospects in adsorption. However, the small particle size of MOF materials and the difficulty of recycling hinder their development. The hydrogel has a three-dimensional network structure that can encapsulate the MOF nanomaterials in the network, enhancing adsorption performance and facilitating separation from the adsorbed solution. In this study, MOF materials were prepared, and hydrogel doped with MOF nanomaterials (polyacrylamide-sodium alginate/metal-organic framework, PAAM-SA/MOF) was used to investigate the adsorption of malachite green in aquaculture water. The transmission electron microscopy was used to characterize MOF nanomaterials, scanning electron microscopy was used to examine the morphology and structure of the hydrogels before and after adsorption of malachite green, representing the successful synthesis of adsorbent materials with excellent properties. The mechanical properties of the hydrogels were investigated using a tensile testing machine, with a maximum tensile strain of up to 300%, without breaking and failing to remove when separated from the solution to be tested. The pore size of PAAM-SA/MOF hydrogel is considerably smaller than that of PAAM-SA, which is beneficial to increase the specific surface area of the adsorbent and thus improve the adsorption performance. A series of optimizations were performed on the adsorption conditions of the hydrogel adsorbent and the optimized conditions were obtained as follows: the amount of adsorbent used was 0.1 g, adsorption time was 5 h, the pH of malachite green solution was 9, the adsorption temperature was 40 ℃, and the initial concentration of malachite green solution was 100 mg/L. Under these conditions the adsorption efficiency could reach up to 97%. Furthermore, the adsorbed malachite green was eluted with organic solvents of various polarities, and the highest desorption efficiency was achieved when acetonitrile with higher polarity was used as the eluent. Simultaneously, the eluent volume was optimized, with 2 mL acetonitrile added to the malachite green-enriched hydrogel adsorbent to achieve the highest desorption efficiency of 99%. The enriched sample was separated using a Dionex Bonded Silica Products C 18 column (50 mm×2.1 mm, 3 μm), and eluted with an ammonium acetate-acetonitrile solvent system. The results showed that the limit of detection (LOD, S/N =3) was 0.083 μg/L, the limit of quantification (LOQ, S/N =10) was 0.25 μg/L, and the spiked recoveries of malachite green at high, medium, and low levels were 84.8%-118.1% with the relative standard deviations less than 5.1%. The pretreatment is simplified using this approach and combines the respective advantages of MOF and hydrogel to enable one-step enrichment of malachite green in aquaculture water. The additional MOF material can exert good adsorption in the hydrogel system, which solves the problem of low recovery of traditional MOF materials caused by tiny particle size, facilitating direct extraction after adsorption, and also solves the problem of low adsorption efficiency of pure hydrogel, improving the overall adsorption efficiency and recyclability. The actual sample test shows that the new hydrogel adsorption material can be used to extract and detect trace malachite green in aquaculture water. It is a novel, fast and convenient pretreatment approach with great potential in food detection.