In clinical applications, food, and human metabolism, biological substances including Xanthine (XA), Ascorbic acid (AA), and Uric acid (UA) play essential functions. Finding a technique to identify these compounds without electrochemical interference is critical since they are found in biological fluids and have comparable standard potential values. Herein, Fe3O4@Au core–shell was synthesized and characterized by using EDS analysis, transmission electron microscopy, X-Ray diffraction, and vibrating sample magnetometer. An electrochemical sensor based on Fe3O4@Au/NPs-ionic liquid (IL) (1-n butyl-3methylimidazolium-hexafluoro phosphate) was developed to detect xanthine. Various electrochemical methods including cyclic voltammetry, square wave voltammetry, and chronoamperometry were used to assess the behavior of XA, AA, and UA on the proposed modified electrode. The linear range was calculated to be 0.8–450 µM, and the detection limit of the modified electrode was obtained as 0.4 μM. The developed sensor was also successfully used to simultaneously detect XA in the presence of UA and AA. Finally, the application of the proposed sensor in the measurement of XA was investigated in food samples such as coca-cola, orange juice, and tuna fish using a standard addition method.