In this work, a novel electrochemical sensor was developed for the determination of diphenylhydramine hydrochloride (DPH). The electrochemical sensor was constructed using a carbon paste electrode (CPE) modified with ferrite–cobalt–silica nanocomposite coated with a new ionic liquid (triethyl-n-octylammonium hexafluorophosphate). In the first step, we synthesized the ferrite–cobalt–silica nanocomposites (Co–Fe2O4–SiO2) characterized with different methods such as scanning electron microscopy (SEM) and fourier transform infrared (FT-IR). In the second step, triethyl-n-octylammonium hexafluorophosphate ionic liquid (E3OAPF6) was synthesized and characterized with different methods such as proton nuclear magnetic resonance (1H NMR) and FT-IR. Ferrite–cobalt nanocomposites coated with ionic liquid were used as the carbon paste electrode modifier for voltammetry determination of DPH in the blood samples. This modified electrode offered considerable improvement in voltammetric sensitivity toward DPH, in comparison to the bare electrode. Differential pulse voltammetry (DPV) displayed a linear dynamic range from 10.0 to 700.0 pM and a detection limit of 1.8 pM for DPH.