A sophisticated electrochemical sensor is presented employing a glassy carbon electrode (GCE) modified with a novel composite of synthesized graphitic carbon nitride (g-C3N4) and CoNiO2 bimetallic oxide nanoparticles (g-C3N4/CoNiO2). The sensor's electrocatalytic capabilities for Sunitinib (SUNI) oxidation were demonstrated exceptional performance with a calculated detection limit (LOD) of 52.0 nM. The successful synthesis and integrity of the composite were confirmed through meticulous characterization using various techniques. FT-IR analysis affirmed the successful synthesis of g-C3N4/CoNiO2 by providing insights into its molecular structure. XRD, FE-SEM, SEM–EDX, and BET analyses collectively validated the material's structural integrity, surface morphology, and electrocatalytic performance. Optimization of key analytical parameters, such as loading volume, concentration, electrolyte solution type, and pH, enhanced the electrocatalytic sensing capabilities of g-C3N4/CoNiO2. The synergistic interaction between g-C3N4 and CoNiO2 bimetallic oxide nanoparticles executed the sensor highly effective in the electrical oxidation of SUNI. Across a concentration range of 0.1–83.8 µM SUNI, the anodic peak current exhibited a linear increase with good precision. Application of the newly developed g-C3N4/CoNiO2 system to detect SUNI in a variety of samples, including urine, human serum, and capsule dosage forms, obtained satisfactory recoveries ranging from 97.1 to 103.0%. This methodology offers a novel approach to underscore the potential of the developed sensor for applications in biological and pharmaceutical monitoring. [ABSTRACT FROM AUTHOR]