A nanocomposite of graphene (Gr) and CoFe2O4 nanoparticles was synthesized with a facile preparation method in order to fabricate a modified carbon paste electrode. The morphology and structure of Gr/CoFe2O4 nanocomposite were investigated by scanning electron microscopy (SEM), and X—ray diffraction (XRD). Also, electrochemical characterization of the nanocomposite was demonstrated with electrochemical impedance spectroscopy. Based on the synergistic effect ofGr and CoFe2 O4 nanoparticles, an ultrasensitive electrochemical sensor for acetaminophen (Ac) and codeine (Cod) was successfully fabricated. The linearity ranged from 0.03 to 12.0 uM for both Ac and Cod. Low detection limits of 0.025 uM for Ac and 0.011 p.M for Cod were achieved based on three times of the standard deviation of the blank over sensitivity (3 s/m). The proposed method was free from interference effects of glucose, ascorbic acid, caffeine, naproxen, alanine, phenylalanine, glycine, and others. No electrode surface fouling was observed during successive scans. High stability, high sensitivity, and low detection limit made the proposed electrode applicable for the analysis of various real samples. Moreover, its practical applicability was reliable and desirable in biological fluids and pharmaceutical samples analysis.