In this work, a graphene oxide magnetic nanocomposite (GO/Fe3O4) was prepared and used as an effective adsorbent for the magnetic solid-phase extraction of trace quantities of malachite green from fish and water samples. This method, which takes advantage of both graphene oxide adsorption and magnetic phase separation from the sample solution, avoids some of the time-consuming experimental procedures related to the traditional solid phase extraction. The excellent adsorption property of the GO/Fe3O4 system is due to the π–π stacking interaction and also electrostatic interactions between oxygen-containing functional groups on the graphene oxide and the cationic dye. The effects of the amount of the extractant composite employed, extraction time, pH values, interfering ions and desorption conditions were investigated. Under optimum conditions, the calibration graph was linear over the range of 1.3–300.0 μg L−1, and an enrichment factor (EF) of 150 was obtained. The detection limit was 0.39 μg L−1, and a relative standard deviation of 2.46% at 60 μg L−1 was obtained (n = 5). The maximum adsorption capacity of the adsorbent under optimum conditions was found to be 27.9 mg g−1 for malachite green. The developed method was successfully applied for the determination of malachite green in fish and water samples.