In this research, a novel and efficient quinoline thioacetamide functionalized magnetic graphene oxide composite (GO@Fe3O4@QTA) was synthesized and utilized for dispersive magnetic solid phase preconcentration of Cd(II) and Ni(II) ions in urine and various food samples. A number of diverse methods were employed for characterization of the new nanosorbent. The design of experiments approach and response surface methodology were applied to monitor and find the parameters that affect the extraction performance. After sorption and elution steps, the concentrations of target analytes were measured by employing FAAS. The highest extraction performance was achieved under the following experimental conditions: pH, 5.8; sorption time, 6.0 min; GO@Fe3O4@QTA amount, 17 mg; 2.4 mL 1.1 mol L-l HNO3 solution as the eluent and elution time, 13.0 min. The detection limit is 0.02 and 0.2 ng mL-1 for Cd(II), and Ni(II) ions, respectively. The accuracy of the new method was investigated by analyzing two certified reference materials (sea food mix, Seronorm LOT NO 2525 urine powder). The interfering study revealed that there are no interferences from commonly occurring ions on the extractability of target ions. Finally, the new method was satisfactorily employed for rapid extraction and determination of target ions in urine and various food samples.